فهرست منبع

Moved config.force_ssl to a ENV variable

Dominik Sander 11 سال پیش
والد
کامیت
05bb31f557
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      config/environments/production.rb

+ 2 - 2
config/environments/production.rb

@@ -37,7 +37,7 @@ Huginn::Application.configure do
   # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
 
   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
-  config.force_ssl = true
+  config.force_ssl = ENV['FORCE_SSL'].present? && ENV['FORCE_SSL'] == 'true' ? true : false
 
   # See everything in the log (default is :info)
   # config.log_level = :debug
@@ -88,4 +88,4 @@ Huginn::Application.configure do
   config.action_mailer.raise_delivery_errors = true
   config.action_mailer.delivery_method = :smtp
   # smtp_settings moved to config/initializers/action_mailer.rb
-end
+end