fix(traefik): trust X-Forwarded-* from RFC1918 sources
Some checks failed
CI / lint (push) Successful in 32s
Deploy / notebooks (push) Has been skipped
Deploy / zotero (push) Has been skipped
Deploy / docs (push) Has been skipped
Deploy / api (push) Has been skipped
Deploy / mc (push) Has been skipped
Package Supply Chain / pkg-supply-chain (push) Failing after 58s
Deploy / report (push) Successful in 15s
CI / test (push) Successful in 13m9s

Real visitor IPs were lost behind the cloudflared tunnel: traefik
saw the cloudflared container's docker IP as the client and ignored
its X-Forwarded-For. Trust RFC1918 on web + websecure so XFF from
the docker bridges (and the LAN) is honored.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
kert
2026-05-19 08:19:38 -04:00
parent 6b02b9560e
commit 794edf884d

View File

@@ -13,8 +13,18 @@ metrics:
entryPoints: entryPoints:
web: web:
address: ":80" address: ":80"
forwardedHeaders:
trustedIPs:
- "10.0.0.0/8"
- "172.16.0.0/12"
- "192.168.0.0/16"
websecure: websecure:
address: ":443" address: ":443"
forwardedHeaders:
trustedIPs:
- "10.0.0.0/8"
- "172.16.0.0/12"
- "192.168.0.0/16"
dns: dns:
address: ":53/udp" address: ":53/udp"