Update nginx.tmpl
add proxy header "X-Forwarded-Host"
This commit is contained in:
parent
a5eaf29c33
commit
80726711e9
1 changed files with 6 additions and 0 deletions
|
@ -55,6 +55,11 @@ map $http_x_forwarded_proto $proxy_x_forwarded_proto {
|
||||||
'' $scheme;
|
'' $scheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
map $http_x_forwarded_host $proxy_x_forwarded_host {
|
||||||
|
default $http_x_forwarded_host;
|
||||||
|
'' $http_host;
|
||||||
|
}
|
||||||
|
|
||||||
# If we receive X-Forwarded-Port, pass it through; otherwise, pass along the
|
# If we receive X-Forwarded-Port, pass it through; otherwise, pass along the
|
||||||
# server port the client connected to
|
# server port the client connected to
|
||||||
map $http_x_forwarded_port $proxy_x_forwarded_port {
|
map $http_x_forwarded_port $proxy_x_forwarded_port {
|
||||||
|
@ -111,6 +116,7 @@ proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection $proxy_connection;
|
proxy_set_header Connection $proxy_connection;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Host $proxy_x_forwarded_host;
|
||||||
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
|
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
|
||||||
proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
|
proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
|
||||||
proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
|
proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
|
||||||
|
|
Loading…
Reference in a new issue