ratelimit: ClientIP ignores X-Forwarded-For behind a proxy #527
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/thwap-pagesd#527
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
internal/ratelimitkeys buckets ongin.Context.ClientIP(), but the daemon never configures trusted proxies (SetTrustedProxies/TrustedProxies), so behind a reverse proxy or the Helm-chart ingress,ClientIP()resolves to the proxy's address for every request. Per-IP limiting then collapses into a single global bucket for all clients (and the 1024-entry cap becomes moot).Context: PR #526 (
internal/ratelimit/ratelimit.go:53).Suggested fix: add a trusted-proxies/forwarded-headers config and honor
X-Forwarded-For, or document that per-IP limiting only works for direct connections.