method

_enforce_open_redirect_protection

Importance_0
v7.0.0 - Show latest stable - 0 notes - Class: ActionController::Redirecting
_enforce_open_redirect_protection(location, allow_other_host:) private

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/redirecting.rb, line 189
      def _enforce_open_redirect_protection(location, allow_other_host))
        if allow_other_host || _url_host_allowed?(location)
          location
        else
          raise UnsafeRedirectError, "Unsafe redirect to #{location.truncate(100).inspect}, pass allow_other_host: true to redirect anyway."
        end
      end
Register or log in to add new notes.