Release: the proxy hop count is set in Settings → Config #221

Merged
bvandeusen merged 3 commits from dev into main 2026-11-05 10:29:52 -05:00
Owner

Milestone 585: "The proxy hop count is set in Settings, beside a readout that shows which one is right".

  • #6866 The server keeps the proxy hop count as an admin setting. Precedence is the saved setting, then TRUSTED_PROXY_HOPS, then 1.
    • Every worker refreshes it every 30s; the startup read gives up after 3s so a slow database can't hold up the boot.
    • New GET and PUT /api/admin/proxy, admin-only and audited.
    • A "too many attempts" reply now points at the setting.
  • #6867 Settings → Config has a Reverse proxy section:
    • it leads with what Grimoire reads your request as;
    • through Cloudflare with the wrong count, it warns and offers "Use N";
    • it has the count field, a table of what each count would read, and the raw forwarding chain.
  • #6868 The docs say the count is set in Settings, and the env var is only its starting value.

CI is green on the last code commit, d2267b6 (run 10244). The final commit is docs only, so it started no run.

🤖 Generated with Claude Code

Milestone 585: "The proxy hop count is set in Settings, beside a readout that shows which one is right". - **#6866** The server keeps the proxy hop count as an admin setting. Precedence is the saved setting, then `TRUSTED_PROXY_HOPS`, then 1. - Every worker refreshes it every 30s; the startup read gives up after 3s so a slow database can't hold up the boot. - New `GET` and `PUT /api/admin/proxy`, admin-only and audited. - A "too many attempts" reply now points at the setting. - **#6867** Settings → Config has a Reverse proxy section: - it leads with what Grimoire reads your request as; - through Cloudflare with the wrong count, it warns and offers "Use N"; - it has the count field, a table of what each count would read, and the raw forwarding chain. - **#6868** The docs say the count is set in Settings, and the env var is only its starting value. CI is green on the last code commit, d2267b6 (run 10244). The final commit is docs only, so it started no run. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 3 commits 2026-11-05 10:29:48 -05:00
feat(6866): the proxy hop count is an admin setting, and the server shows what each count reads
CI & Build / Python lint (push) Successful in 2s
CI & Build / TypeScript typecheck (push) Successful in 32s
CI & Build / integration (push) Successful in 2m1s
CI & Build / Build & push image (push) Successful in 20s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / Python tests (push) Successful in 1m47s
753a6ccb31
An admin can save how many reverse proxies stand in front of Grimoire.
A saved count wins over TRUSTED_PROXY_HOPS, which stays the starting
value. Each worker loads it at startup (under a deadline) and re-reads
it every 30s; the worker that saves applies it at once.

GET/PUT /api/admin/proxy returns the count, where it came from, and a
readout of the admin's own request: the socket peer, the forwarding
chains, what counts 0-3 would read, and the count that reads
Cloudflare's visitor when Cloudflare's headers are present. Saves are
audit-logged. A "too many attempts" reply now says where to look when
everyone is being blocked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(6867): Settings → Config has a Reverse proxy section that shows which count is right
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 32s
CI & Build / Python tests (push) Successful in 1m46s
CI & Build / integration (push) Successful in 2m8s
CI & Build / Build & push image (push) Successful in 33s
d2267b615f
The section opens with a verdict on the admin's own request: the
address Grimoire reads them as, or, through Cloudflare, the count to set
with a button that sets it. Below it are the count with where it came
from, a table of what counts 0-3 would read, and the raw forwarding
chain. A saved count can be cleared back to the environment's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration, the README env table and the features page say Settings
-> Config -> Reverse proxy is where the count is checked and set,
that a saved count wins over TRUSTED_PROXY_HOPS, that Cloudflare in
front of your own proxy is 2, and what a too-low count does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bvandeusen merged commit b23275d5f3 into main 2026-11-05 10:29:52 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledGrimoire#221