Skip to content

Instantly share code, notes, and snippets.

@mlangenberg
Last active December 12, 2015 00:28
Show Gist options
  • Save mlangenberg/4683657 to your computer and use it in GitHub Desktop.
Save mlangenberg/4683657 to your computer and use it in GitHub Desktop.
# in routes.rb
match "/app" => MyRackApp.build
class MyRackApp
self.build
Rack::Auth::Basic.new(new) do |user, pass|
[user, pass] == %w( john snow )
end
end
def call(env)
[200, {"Content-Type" => "text/html"}, "Hello Rack!"]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment