diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-03-12 09:46:31 -0700 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-03-12 09:46:31 -0700 |
commit | bf6fc976fb29adbc8d46336d3d010c99effcaef0 (patch) | |
tree | 4e74742f2806d06f0888e2a327c7dd0494986c9e /config/environments/production.rb | |
parent | 0735585de2d037e3b7495d701f2f2e199f483889 (diff) | |
parent | 334769f7f261773d9c07a1b92c811ef588dd10b2 (diff) |
Merge remote-tracking branch 'openaustralia_github/force-ssl' into develop
Conflicts:
Gemfile.lock
Diffstat (limited to 'config/environments/production.rb')
-rw-r--r-- | config/environments/production.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config/environments/production.rb b/config/environments/production.rb index 84a8f5965..097944196 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -17,3 +17,10 @@ config.action_controller.perform_caching = true # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false config.action_mailer.delivery_method = :sendmail # so is queued, rather than giving immediate errors + +require 'rack/ssl' +if ::Configuration::force_ssl + config.middleware.insert_after ActionController::Failsafe, ::Rack::SSL + # For Rails 3.x this will need to change to + #config.middleware.insert_before ActionDispatch::Cookies, ::Rack::SSL +end |