Skip to content

Commit 9cb4eb9

Browse files
authored
always set x-client-ip from frontend (#545)
This condition was in place to support the proxy nonsense we had going that was removed in #543, we can go ahead and always set this now that our frontend is handling tls
1 parent 511dc1d commit 9cb4eb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

salt/haproxy/config/haproxy.cfg.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ frontend main
140140
# Deny requests that are not served from this host
141141
http-request deny if !our_domains !letsencrypt-well-known-acl
142142

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

0 commit comments

Comments
 (0)