Redaction configuration
Redact sensitive header values, replacing them with "***".
Redact sensitive query parameters from a URL.
Absolute URLs go through URL, which also normalises the result. A URL the
URL constructor rejects — every relative form, and relative forms are what
HTTPLogger.child's own example logs — used to be returned untouched, so
logRequest(id, "GET", "/users?token=abc", ...) wrote the token in clear
while the absolute spelling of the same request redacted it. Those fall back
to a textual scan of the query string below.
Redact and optionally truncate a request or response body.
An object containing body (the redacted/truncated body string, or null)
and size (the original byte size, or null).
The redacted/truncated body string, or null.
The original byte size, or null.
Redacts sensitive data from headers, URLs, and request/response bodies before they are written to log output.