add X-Forwarded-For Header to request
This commit is contained in:
parent
9054acff51
commit
f4f6ade0a4
@ -25,6 +25,10 @@ frontend http
|
|||||||
bind *:80
|
bind *:80
|
||||||
reqadd X-Forwarded-Proto:\ http
|
reqadd X-Forwarded-Proto:\ http
|
||||||
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
|
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 }
|
redirect scheme https code 301 if !{ ssl_fc }
|
||||||
use_backend letsencrypt-backend if letsencrypt-acl
|
use_backend letsencrypt-backend if letsencrypt-acl
|
||||||
default_backend www-backend
|
default_backend www-backend
|
||||||
@ -33,6 +37,10 @@ frontend https
|
|||||||
bind *:443 ssl crt /data/haproxy/cert.pem
|
bind *:443 ssl crt /data/haproxy/cert.pem
|
||||||
reqadd X-Forwarded-Proto:\ https
|
reqadd X-Forwarded-Proto:\ https
|
||||||
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
|
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
|
use_backend letsencrypt-backend if letsencrypt-acl
|
||||||
default_backend www-backend
|
default_backend www-backend
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user