Class: Raven::Processor::HTTPHeaders
- Inherits:
-
Raven::Processor
- Object
- Raven::Processor
- Raven::Processor::HTTPHeaders
- Defined in:
- lib/raven/processor/http_headers.rb
Constant Summary collapse
- DEFAULT_FIELDS =
["Authorization"].freeze
Constants inherited from Raven::Processor
INT_MASK, REGEX_SPECIAL_CHARACTERS, STRING_MASK
Instance Attribute Summary collapse
-
#sanitize_http_headers ⇒ Object
Returns the value of attribute sanitize_http_headers.
Instance Method Summary collapse
-
#initialize(client) ⇒ HTTPHeaders
constructor
A new instance of HTTPHeaders.
- #process(data) ⇒ Object
Constructor Details
#initialize(client) ⇒ HTTPHeaders
Returns a new instance of HTTPHeaders.
7 8 9 10 |
# File 'lib/raven/processor/http_headers.rb', line 7 def initialize(client) super self.sanitize_http_headers = client.configuration.sanitize_http_headers end |
Instance Attribute Details
#sanitize_http_headers ⇒ Object
Returns the value of attribute sanitize_http_headers.
5 6 7 |
# File 'lib/raven/processor/http_headers.rb', line 5 def sanitize_http_headers @sanitize_http_headers end |
Instance Method Details
#process(data) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/raven/processor/http_headers.rb', line 12 def process(data) if data[:request] && data[:request][:headers] data[:request][:headers].keys.select { |k| fields_re.match(k.to_s) }.each do |k| data[:request][:headers][k] = STRING_MASK end end data end |