From ee82d8a8761f0bedc97f5e79565b7c5142c1b8bd Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Sat, 22 Apr 2017 22:22:22 -0400 Subject: Move force_ssl check to production config (#2165) The force_ssl method from controllers does not add all of the options that the sitewide configuration in a config block does. For example, HSTS enforcement is not added by the controller method, but is added by this style. --- config/environments/production.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'config/environments') diff --git a/config/environments/production.rb b/config/environments/production.rb index eff4c293f..cf4b3e7f9 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -108,6 +108,7 @@ Rails.application.configure do config.action_mailer.delivery_method = ENV.fetch('SMTP_DELIVERY_METHOD', 'smtp').to_sym + config.force_ssl = (ENV['LOCAL_HTTPS'] == 'true') config.react.variant = :production -- cgit