Ir al contenido

RedactionConfig

Esta página aún no está disponible en tu idioma.

Defined in: utils/redact.ts:26

optional allowCookies?: 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.


optional allowHeaders?: 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.


optional bodyPatterns?: (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.


optional headers?: 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.


optional placeholder?: string

Defined in: utils/redact.ts:54

Replacement string. Defaults to REDACTED_PLACEHOLDER.