Refuse a TRUST_PROXY the apps can't start with; Accounts reads loopback

A server configuration with TRUST_PROXY=TRUE made an Events install build for
minutes, then fail: Express threw "invalid IP address: TRUE" at startup.

- scripts/lib/envtpl.cjs: VALUE_RULES checked before any .env is written
  (exit 4, naming the value and the fix), for every release.
- Contracts 1.6.0: agent.checkEnvValue / agent.invalidValues, the same rules
  for the Hub.
- Accounts 1.0.1: TRUST_PROXY read as Events reads it; loopback used to
  turn proxy trust off.
- Docs: CHANGELOGs, WHATS-NEW, HANDOVER, AGENT-1.0-PLAN, ROLLOUT-1.0, READMEs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 10:23:49 +02:00
co-authored by Claude Opus 5.5
parent db2e544ed6
commit fd8f6c28b0
19 changed files with 220 additions and 16 deletions
+4 -1
View File
@@ -188,7 +188,10 @@ monorepo, listing every variable with its layer, whether it's required, and a de
**For Joshua to set per server before the first install:** the database settings and
`TRUST_PROXY`. Behind frp the app sees every connection from frpc on `127.0.0.1`, and the
visitor's address arrives in `X-Forwarded-For` from FastPanel's nginx, so the expected value is
`loopback` (the Hub suggests it).
`loopback` (the Hub suggests it). A value the apps can't start with (e.g. `TRUE`, which crashed
the Events backend after a whole install's build) is refused when the configuration is saved (Hub
2.3.3), before a job is made, and again by the crosscode script before it writes a `.env`
(`checkEnvValue` in `@crosscode/contracts` 1.6.0, `VALUE_RULES` in `scripts/lib/envtpl.cjs`).
## 6. frp and the central server