# RedactionConfig

Canonical: <https://test-proxy-recorder.dev/docs/reference/api/interfaces/redactionconfig/>
Docs index: <https://test-proxy-recorder.dev/docs/> · All docs as one file: <https://test-proxy-recorder.dev/llms-full.txt>

---

Defined in: [utils/redact.ts:26](https://github.com/asmyshlyaev177/test-proxy-recorder/blob/d1bacb3b39a3cf6f7f5a5391a8201868e4629861/packages/test-proxy-recorder/src/utils/redact.ts#L26)

## Properties

### allowCookies?

> `optional` **allowCookies?**: `string`[]

Defined in: [utils/redact.ts:45](https://github.com/asmyshlyaev177/test-proxy-recorder/blob/d1bacb3b39a3cf6f7f5a5391a8201868e4629861/packages/test-proxy-recorder/src/utils/redact.ts#L45)

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?

> `optional` **allowHeaders?**: `string`[]

Defined in: [utils/redact.ts:38](https://github.com/asmyshlyaev177/test-proxy-recorder/blob/d1bacb3b39a3cf6f7f5a5391a8201868e4629861/packages/test-proxy-recorder/src/utils/redact.ts#L38)

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?

> `optional` **bodyPatterns?**: (`string` \| `RegExp`)[]

Defined in: [utils/redact.ts:52](https://github.com/asmyshlyaev177/test-proxy-recorder/blob/d1bacb3b39a3cf6f7f5a5391a8201868e4629861/packages/test-proxy-recorder/src/utils/redact.ts#L52)

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?

> `optional` **headers?**: `string`[]

Defined in: [utils/redact.ts:32](https://github.com/asmyshlyaev177/test-proxy-recorder/blob/d1bacb3b39a3cf6f7f5a5391a8201868e4629861/packages/test-proxy-recorder/src/utils/redact.ts#L32)

Additional header names (case-insensitive) to redact. Merged with
[DEFAULT\_REDACTED\_HEADERS](/docs/reference/api/variables/default_redacted_headers/) — the defaults always apply while
enabled.

***

### placeholder?

> `optional` **placeholder?**: `string`

Defined in: [utils/redact.ts:54](https://github.com/asmyshlyaev177/test-proxy-recorder/blob/d1bacb3b39a3cf6f7f5a5391a8201868e4629861/packages/test-proxy-recorder/src/utils/redact.ts#L54)

Replacement string. Defaults to [REDACTED\_PLACEHOLDER](/docs/reference/api/variables/redacted_placeholder/).
