add X-Forwarded-For Header to request

This commit is contained in:
Joachim Lusiardi 2016-12-29 19:14:26 +01:00
parent 9054acff51
commit f4f6ade0a4

View File

@ -25,6 +25,10 @@ frontend http
bind *:80
reqadd X-Forwarded-Proto:\ http
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
# add X-Forwarded-For Header to request
http-request add-header X-Forwarded-For %[src]
redirect scheme https code 301 if !{ ssl_fc }
use_backend letsencrypt-backend if letsencrypt-acl
default_backend www-backend
@ -33,6 +37,10 @@ frontend https
bind *:443 ssl crt /data/haproxy/cert.pem
reqadd X-Forwarded-Proto:\ https
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
# add X-Forwarded-For Header to request
http-request add-header X-Forwarded-For %[src]
use_backend letsencrypt-backend if letsencrypt-acl
default_backend www-backend