Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ present.
# Public origins accepted for CSRF when a reverse proxy serves Codex under
# another scheme or host than Codex sees (e.g. https in front of http).
# First make sure the proxy sends X-Forwarded-Proto and X-Forwarded-Host.
# A correctly configured proxy does, and then you shouldn't need this.
# csrf_trusted_origins = ["https://comics.example.com"]

# [logging]
Expand Down Expand Up @@ -709,8 +710,9 @@ above is what keeps the static assets reachable.
If logging in or saving changes fails with a 403 "CSRF Failed" error behind a
reverse proxy, first make sure the proxy sends `X-Forwarded-Proto` and
`X-Forwarded-Host` (the nginx example above does). Codex compares them with the
browser's `Origin` header. Only if the proxy can't send them, or the error
persists, add the public origin the browser uses to `config/codex.toml`:
browser's `Origin` header, so a correctly configured proxy ordinarily needs no
CSRF setting at all. Only if the proxy can't send them, or the error persists,
add the public origin the browser uses to `config/codex.toml`:

```toml
[server]
Expand Down
1 change: 1 addition & 0 deletions codex/settings/codex.toml.default
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# Public origins accepted for CSRF when a reverse proxy serves Codex under
# another scheme or host than Codex sees (e.g. https in front of http).
# First make sure the proxy sends X-Forwarded-Proto and X-Forwarded-Host.
# A correctly configured proxy does, and then you shouldn't need this.
# csrf_trusted_origins = ["https://comics.example.com"]
# Worker threads that keep a warm database connection between requests.
# Opening one costs a few milliseconds, mostly SQLite re-reading the
Expand Down