-
-
Save polarblau/5817541 to your computer and use it in GitHub Desktop.
Protect a Middleman application via basic auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'middleman/rack' | |
protected_middleman = Rack::Auth::Basic.new(Middleman.server) do |username, password| | |
[username, password] == ['theuser', 'thepassword'] | |
end | |
run protected_middleman |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you. thank you thank you thank you.
Wish I had found this 2 hours ago !