method

normalize_hsts_options

rails latest stable - Class: ActionDispatch::SSL

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.1.7) is shown here.

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