fix(haproxy): set X-CLIENT-IP instead of adding it #11

Merged
jknapp merged 2 commits from fix/x-client-ip-set-not-add into main 2026-09-18 23:33:05 +00:00
Owner

Refs #10.

The trusted-proxy strip for CF-Connecting-IP / X-Real-IP / X-Forwarded-For has been in main since 79a1b84 (2026-08-13) and is in the published :latest; the host in #10 was running an older image and needs a recreate.

This PR closes the remaining gap from the report: X-CLIENT-IP was add-header, so a client-supplied copy survived alongside ours. Now set-header in all backend templates. Bumps VERSION to 2026.09.1.

Verified: docker build (haproxy -c gate) passes; test-trusted-proxy-gate.py passes in the built image.

🤖 Generated with Claude Code

Refs #10. The trusted-proxy strip for CF-Connecting-IP / X-Real-IP / X-Forwarded-For has been in main since 79a1b84 (2026-08-13) and is in the published :latest; the host in #10 was running an older image and needs a recreate. This PR closes the remaining gap from the report: X-CLIENT-IP was `add-header`, so a client-supplied copy survived alongside ours. Now `set-header` in all backend templates. Bumps VERSION to 2026.09.1. Verified: docker build (haproxy -c gate) passes; test-trusted-proxy-gate.py passes in the built image. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jknapp added 2 commits 2026-09-18 23:32:56 +00:00
add-header let a client-supplied X-CLIENT-IP survive next to ours, so a
backend reading the first occurrence got the attacker's value. set-header
replaces any inbound copy. Refs #10.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
jknapp force-pushed fix/x-client-ip-set-not-add from cbcaea8abb to cc2cfd82a2 2026-09-18 23:32:56 +00:00 Compare
jknapp merged commit e134b2b234 into main 2026-09-18 23:33:05 +00:00
jknapp deleted branch fix/x-client-ip-set-not-add 2026-09-18 23:33:05 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cloud-hosting-platform/haproxy-manager-base#11