method

_enforce_open_redirect_protection

rails latest stable - Class: ActionController::Redirecting
_enforce_open_redirect_protection(location, allow_other_host:)
private

No documentation available.

# File actionpack/lib/action_controller/metal/redirecting.rb, line 195
      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