Created
January 22, 2015 18:20
-
-
Save pmkhoa/f6444bc4ab60c9c82df4 to your computer and use it in GitHub Desktop.
Middleman Authentication via Rack
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