instance method _handle_path_relative_redirect

Ruby on Rails 8.1.2

Since v8.1.2 Private

Signature

_handle_path_relative_redirect(url)

No documentation comment.

Parameters

url req
Source
# File actionpack/lib/action_controller/metal/redirecting.rb, line 327
      def _handle_path_relative_redirect(url)
        message = "Path relative URL redirect detected: #{url.inspect}"

        case action_on_path_relative_redirect
        when :log
          logger&.warn message
        when :notify
          ActiveSupport::Notifications.instrument("unsafe_redirect.action_controller",
            url: url,
            message: message,
            stack_trace: caller
          )
        when :raise
          raise PathRelativeRedirectError.new(url)
        end
      end

Defined in actionpack/lib/action_controller/metal/redirecting.rb line 327 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::Redirecting

Type at least 2 characters to search.

↑↓ navigate · open · esc close