ratelimit: rightmost untrusted-hop-safe client IP (fixes #85) #89

Merged
poslop merged 1 commits from fix-85-xff into main 2026-09-09 15:59:29 +00:00
Owner

clientIP() now takes the RIGHTMOST X-Forwarded-For entry (appended by the trusted Traefik proxy), falling back to X-Real-Ip then RemoteAddr. Spoofed leftmost XFF entries no longer rotate rate-limit buckets. Trust boundary documented in ratelimit.go. Regression tests: spoofed-first-XFF cannot bypass the create limit.

Fixes #85

clientIP() now takes the RIGHTMOST X-Forwarded-For entry (appended by the trusted Traefik proxy), falling back to X-Real-Ip then RemoteAddr. Spoofed leftmost XFF entries no longer rotate rate-limit buckets. Trust boundary documented in ratelimit.go. Regression tests: spoofed-first-XFF cannot bypass the create limit. Fixes #85
poslop added 1 commit 2026-09-09 15:58:08 +00:00
ratelimit: key on rightmost X-Forwarded-For entry (fixes #85)
CI / docker (pull_request) Skipped
CI / test (pull_request) Successful in 21s
3d1d5ee1fd
poslop merged commit 5b068faf8f into main 2026-09-09 15:59:29 +00:00
Sign in to join this conversation.