Sha256: a186145488b324a77c7e92193ce2de26611f572996c896d7e847ddc94ab4943b

Contents?: true

Size: 594 Bytes

Versions: 18

Compression:

Stored size: 594 Bytes

Contents

# frozen_string_literal: true

module Airbrake
  module Rack
    # Adds HTTP request parameters.
    #
    # @since v5.7.0
    class HttpParamsFilter
      # @return [Integer]
      attr_reader :weight

      def initialize
        @weight = 97
      end

      # @see Airbrake::FilterChain#refine
      def call(notice)
        return unless (request = notice.stash[:rack_request])

        notice[:params].merge!(request.params)

        rails_params = request.env['action_dispatch.request.parameters']
        notice[:params].merge!(rails_params) if rails_params
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
airbrake-13.0.5 lib/airbrake/rack/http_params_filter.rb
airbrake-13.0.4 lib/airbrake/rack/http_params_filter.rb
airbrake-13.0.3 lib/airbrake/rack/http_params_filter.rb
airbrake-13.0.2 lib/airbrake/rack/http_params_filter.rb
airbrake-13.0.1 lib/airbrake/rack/http_params_filter.rb
airbrake-13.0.0 lib/airbrake/rack/http_params_filter.rb
airbrake-12.0.0 lib/airbrake/rack/http_params_filter.rb
airbrake-11.0.3 lib/airbrake/rack/http_params_filter.rb
airbrake-11.0.2 lib/airbrake/rack/http_params_filter.rb
airbrake-11.0.1 lib/airbrake/rack/http_params_filter.rb
airbrake-10.0.6 lib/airbrake/rack/http_params_filter.rb
airbrake-11.0.0 lib/airbrake/rack/http_params_filter.rb
airbrake-10.1.0.rc.1 lib/airbrake/rack/http_params_filter.rb
airbrake-10.0.5 lib/airbrake/rack/http_params_filter.rb
airbrake-10.0.4 lib/airbrake/rack/http_params_filter.rb
airbrake-10.0.3 lib/airbrake/rack/http_params_filter.rb
airbrake-10.0.2 lib/airbrake/rack/http_params_filter.rb
airbrake-10.0.1 lib/airbrake/rack/http_params_filter.rb