From 421f9907b99bc9698c5b1ebdda482e715200d3ee Mon Sep 17 00:00:00 2001 From: Markus Graf Date: Fri, 10 Nov 2017 09:55:40 +0100 Subject: [PATCH] Added password for staging --- config/environments/staging.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 12fd4f9..48d165c 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -1,6 +1,11 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. + config.middleware.insert_before(::Rack::Runtime, "::Rack::Auth::Basic", "Staging") do |_u, p| + p == ENV['STAGING_PASSWORD'] + end + + # Code is not reloaded between requests. config.cache_classes = true