Class: Hoss::Transport::Filters::SecretsFilter Private
- Inherits:
-
Object
- Object
- Hoss::Transport::Filters::SecretsFilter
- Defined in:
- lib/hoss/transport/filters/secrets_filter.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #call(payload) ⇒ Object private
-
#initialize(config) ⇒ SecretsFilter
constructor
private
A new instance of SecretsFilter.
Constructor Details
#initialize(config) ⇒ SecretsFilter
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SecretsFilter.
27 28 29 30 31 32 |
# File 'lib/hoss/transport/filters/secrets_filter.rb', line 27 def initialize(config) @config = config @sanitizer = HashSanitizer.new @sanitizer.key_filters += config.custom_key_filters + config.sanitize_field_names end |
Instance Method Details
#call(payload) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/hoss/transport/filters/secrets_filter.rb', line 34 def call(payload) @sanitizer.strip_from! payload.dig(:transaction, :context, :request, :headers) @sanitizer.strip_from! payload.dig(:transaction, :context, :request, :env) @sanitizer.strip_from! payload.dig(:transaction, :context, :request, :cookies) @sanitizer.strip_from! payload.dig(:transaction, :context, :response, :headers) @sanitizer.strip_from! payload.dig(:error, :context, :request, :headers) @sanitizer.strip_from! payload.dig(:error, :context, :response, :headers) @sanitizer.strip_from! payload.dig(:transaction, :context, :request, :body) payload end |