Skip to content

Note that a correctly configured proxy doesn't need csrf_trusted_origins - #979

Merged
ajslater merged 1 commit into
developfrom
csrf-origins-docs-blurb
Oct 19, 2026
Merged

ajslater merged 1 commit into
developfrom
csrf-origins-docs-blurb

Conversation

@ajslater

Copy link
Copy Markdown
Owner

Summary

Follow-up to #978. csrf_trusted_origins is a fallback for a proxy that can't send X-Forwarded-Proto and X-Forwarded-Host. The docs now say so right next to the advice to check those headers:

  • codex.toml.default and the README's copy of it: one comment line under the X-Forwarded-* line saying a correctly configured proxy sends both, so the setting shouldn't be needed.
  • README "CSRF 403 behind a proxy": one sentence saying a correctly configured proxy ordinarily needs no CSRF setting at all.

Docs and comments only.

Test plan

  • The TOML block is identical in codex.toml.default and the README copy.
  • codex.toml.default still parses with tomllib.
  • make fix and make lint clean. Settings tests pass (24 passed).

🤖 Generated with Claude Code

The setting is a fallback for a proxy that can't send X-Forwarded-Proto
and X-Forwarded-Host. Say so next to that advice in the codex.toml
comments and the README's "CSRF 403 behind a proxy" section, so users fix
the proxy first instead of reaching for the setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ajslater
ajslater merged commit 4715894 into develop Oct 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant