Created
June 1, 2011 19:09
-
-
Save adamesque/1003046 to your computer and use it in GitHub Desktop.
Password-protected Middleman via Rack/Heroku
This file contains hidden or 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' | |
middleman_app = Middleman::Server.new | |
protected_middleman = Rack::Auth::Basic.new(middleman_app) do |username, password| | |
[username, password] == ['theuser', 'thepassword'] | |
end | |
run protected_middleman |
@webfella — I believe it should nowadays probably be more something like this: https://gist.github.com/polarblau/5817541
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the above in my rack config gives me the following error log
uninitialized constant Middleman::Server (NameError)