We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 430bff2 commit 470b2e4Copy full SHA for 470b2e4
lib/sentry/plug.ex
@@ -1,9 +1,4 @@
1
if Code.ensure_loaded?(Plug) do
2
- if Code.ensure_loaded?(Jason) do
3
- require Protocol
4
- Protocol.derive(Jason.Encoder, Plug.Upload)
5
- end
6
-
7
defmodule Sentry.Plug do
8
@default_scrubbed_param_keys ["password", "passwd", "secret"]
9
@default_scrubbed_header_keys ["authorization", "authentication", "cookie"]
@@ -226,7 +221,11 @@ if Code.ensure_loaded?(Plug) do
226
221
is_binary(value) && Regex.match?(@credit_card_regex, value) ->
227
222
@scrubbed_value
228
223
229
- is_map(value) && !Map.has_key?(value, :__struct__) ->
224
+ is_map(value) && Map.has_key?(value, :__struct__) ->
225
+ Map.from_struct(value)
+ |> scrub_map()
+
+ is_map(value) ->
230
scrub_map(value)
231
232
true ->
0 commit comments