fix(http connector): remove sensitive info from headers lazily
In production code we don't need to redact the headers for a trace that will never appear anywhere so we can improve performance by doing removal of sensitive information lazily.
This commit is contained in:
parent
ef9884cf47
commit
ff09f14191
|
@ -512,7 +512,7 @@ trace_rendered_action_template(ActionId, Host, Method, NRequest, Timeout) ->
|
|||
host => Host,
|
||||
path => Path,
|
||||
method => Method,
|
||||
headers => emqx_utils_redact:redact_headers(Headers),
|
||||
headers => {fun emqx_utils_redact:redact_headers/1, Headers},
|
||||
timeout => Timeout
|
||||
}
|
||||
);
|
||||
|
@ -523,7 +523,7 @@ trace_rendered_action_template(ActionId, Host, Method, NRequest, Timeout) ->
|
|||
host => Host,
|
||||
path => Path,
|
||||
method => Method,
|
||||
headers => emqx_utils_redact:redact_headers(Headers),
|
||||
headers => {fun emqx_utils_redact:redact_headers/1, Headers},
|
||||
timeout => Timeout,
|
||||
body => {fun log_format_body/1, Body}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue