nowk
2/4/2013 - 7:25 AM

staging.rb

# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = true

config.middleware.insert_after(::Rack::Lock, "::Rack::Auth::Basic", "Staging") do |u, p|
  [u, p] == [ENV['BASIC_AUTH_USER'], ENV['BASIC_AUTH_PASSWORD']]
end