RedactionConfig
Esta página aún no está disponible en tu idioma.
Defined in: utils/redact.ts:26
Properties
Section titled “Properties”allowCookies?
Section titled “allowCookies?”
optionalallowCookies?:string[]
Defined in: utils/redact.ts:45
Cookie names (case-insensitive) to keep unredacted inside the Cookie
and Set-Cookie headers. Every other cookie in those headers still has
its value replaced. Use this when only some cookies are sensitive — e.g.
keep a theme or A/B-test cookie while redacting the session cookie.
allowHeaders?
Section titled “allowHeaders?”
optionalallowHeaders?:string[]
Defined in: utils/redact.ts:38
Header names (case-insensitive) to leave untouched even if they would
otherwise be redacted. Use to exempt a header from the defaults, e.g.
['set-cookie'] when no session cookie is set on responses.
bodyPatterns?
Section titled “bodyPatterns?”
optionalbodyPatterns?: (string|RegExp)[]
Defined in: utils/redact.ts:52
Patterns matched against request/response bodies (and WebSocket message payloads). Every match is replaced with the placeholder. Strings are treated as global regular expressions. Use this for API keys or tokens embedded in payloads.
headers?
Section titled “headers?”
optionalheaders?:string[]
Defined in: utils/redact.ts:32
Additional header names (case-insensitive) to redact. Merged with DEFAULT_REDACTED_HEADERS — the defaults always apply while enabled.
placeholder?
Section titled “placeholder?”
optionalplaceholder?:string
Defined in: utils/redact.ts:54
Replacement string. Defaults to REDACTED_PLACEHOLDER.