method

force_ssl

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ClassMethods

Method deprecated or moved

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

force_ssl(options = {}) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/metal/force_ssl.rb, line 19
      def force_ssl(options = {})
        ActiveSupport::Deprecation.warn(          Controller-level `force_ssl` is deprecated and will be removed from          Rails 6.1. Please enable `config.force_ssl` in your environment          configuration to enable the ActionDispatch::SSL middleware to more          fully enforce that your application communicate over HTTPS. If needed,          you can use `config.ssl_options` to exempt matching endpoints from          being redirected to HTTPS..squish)

        action_options = options.slice(*ACTION_OPTIONS)
        redirect_options = options.except(*ACTION_OPTIONS)
        before_action(action_options) do
          force_ssl_redirect(redirect_options)
        end
      end
Register or log in to add new notes.