0
0
Fork 0

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.
This commit is contained in:
Matt Jankowski 2017-04-22 22:22:22 -04:00 committed by Eugen
parent 1646ca75f0
commit ee82d8a876
2 changed files with 1 additions and 2 deletions

View file

@ -5,8 +5,6 @@ class ApplicationController < ActionController::Base
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
force_ssl if: "Rails.env.production? && ENV['LOCAL_HTTPS'] == 'true'"
include Localized
helper_method :current_account