What
A ANTHROPIC_CUSTOM_HEADERS value supplied through settings used to be copied into the process environment unchecked. It now has to pass a validation step first, closing a path where settings could inject arbitrary header material.
Details
- Rejects bare carriage-return line endings and any header line whose value looks like a redirect payload.
- Rejects header names matching a broad sensitive-key pattern covering auth, key, token, cookie, secret, credential, session, signature, passw and jwt.
- Always enforced; this removes a previous bypass rather than adding an opt-in.
Evidence
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Names in the bundleANTHROPIC_CUSTOM_HEADERS
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added since
A small documentation edit on Configure server-managed settings touched a line naming ANTHROPIC_CUSTOM_HEADERS after this was published.
Whether [`ANTHROPIC_CUSTOM_HEADERS`](/docs/en/env-vars#variables) needs approval also depends on the delivered value. Headers that only tag requests, such as `Accept-Language`, apply without the dialog. A line that names a credential, an o…server-managed-settings see the edit
Confirmed since
Anthropic's documentation has since written up ANTHROPIC_CUSTOM_HEADERS, on Connect Claude Code to an LLM gateway.
* **Amazon Bedrock, Google Cloud's Agent Platform, or Claude Platform on AWS**: add `ANTHROPIC_AUTH_TOKEN` after the block. Claude Code sends it to the gateway as an `Authorization: Bearer` header. For a credential in a different scheme or…llm-gateway-connect see the edit
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up ANTHROPIC_CUSTOM_HEADERS, on Connect Claude Code to an LLM gateway.
Anthropic's release notes agree
Changed ANTHROPIC_CUSTOM_HEADERS from managed or project settings to require approval when it sets a credential, org/tenant, routing, or…