Sha256: 56c415e35f6f489790fe36aca2d6054cf379d6852036e4d1a125a55abfca43e6

Contents?: true

Size: 478 Bytes

Versions: 17

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

module Airbrake
  module Rack
    # Adds HTTP session.
    #
    # @since v5.7.0
    class SessionFilter
      # @return [Integer]
      attr_reader :weight

      def initialize
        @weight = 96
      end

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

        session = request.session
        notice[:session] = session if session
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

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