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.
# 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
config.action_mailer.delivery_method = ENV.fetch('SMTP_DELIVERY_METHOD', 'smtp').to_sym
+ config.force_ssl = (ENV['LOCAL_HTTPS'] == 'true')
config.react.variant = :production