Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always set x-client-ip from frontend #545

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion salt/haproxy/config/haproxy.cfg.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ frontend main
# Deny requests that are not served from this host
http-request deny if !our_domains !letsencrypt-well-known-acl

http-request set-header X-Client-IP %[src]
# Tell the backend servers whether this request is being served via TLS or
# not. This should pretty much *always* be yes since we unconditionally
# redirect to HTTPS in HAProxy.
http-request set-header X-Client-IP %[src] if !is_tls
http-request set-header X-Forwarded-Proto https if is_tls
http-request set-header X-Forwarded-Proto http if !is_tls

Expand Down
Loading