You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bc02284
Browse filesBrowse the repository at this point in the historyBrowse files
docs: deployment recipe + verify checklist for ClientIPFromXFFTrustedProxies (#1111)
Replace the counting prose and ASCII diagram with a recipe table mapping
common deployments to numTrustedProxies values, plus a "verify with a
known IP" step. Steer users toward ClientIPFromXFF with explicit CIDRs
(added pointers to CDN-published IP lists from Cloudflare, AWS, Fastly,
GCP) since CIDR-based trust cannot off-by-one. Add one fail-closed test
case.
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -465,6 +465,11 @@ is folded to plain IPv4, and IPv6 zone identifiers carried in headers are
465
465
stripped, so one logical client maps to a single canonical key for logs,
466
466
rate limits, and ACLs.
467
467
468
+
For `ClientIPFromXFFTrustedProxies`, `numTrustedProxies` is the total proxy
469
+
hops between client and server. Prefer `ClientIPFromXFF` with explicit CIDRs
470
+
when you can — CIDR-based trust cannot off-by-one. See the godoc for a
471
+
deployment recipe and a verify checklist.
472
+
468
473
See the per-function godoc for the full semantics of each middleware, and
469
474
[adam-p's "The perils of the 'real' client IP"](https://adam-p.ca/blog/2022/03/x-forwarded-for/)
0 commit comments