add support to overwrite host header if only a location has a backend

This commit is contained in:
nd 2021-12-24 18:42:48 +01:00
parent 5b201a05cf
commit 3a52a1156f
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 4 additions and 1 deletions

View file

@ -50,7 +50,7 @@ server {
proxy_buffering off;
# add proxy headers
proxy_set_header Host {{ vhost.host }};
proxy_set_header Host {{ location.host|d(vhost.host) }};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;