method
normalize_hsts_options
rails latest stable - Class:
ActionDispatch::SSL
normalize_hsts_options(options)private
No documentation available.
# File actionpack/lib/action_dispatch/middleware/ssl.rb, line 83
def normalize_hsts_options(options)
case options
# Explicitly disabling HSTS clears the existing setting from browsers
# by setting expiry to 0.
when false
self.class.default_hsts_options.merge(expires: 0)
# Default to enabled, with default options.
when nil, true
self.class.default_hsts_options
else
self.class.default_hsts_options.merge(options)
end
end