Improve X-Forwarded-Host support
This commit is contained in:
parent
1468fcb1aa
commit
5f02858623
1 changed files with 6 additions and 1 deletions
|
@ -169,11 +169,16 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Obtain best http host
|
# Obtain best http host
|
||||||
map $http_host $best_http_host {
|
map $http_host $this_host {
|
||||||
default $http_host;
|
default $http_host;
|
||||||
'' $host;
|
'' $host;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
map $http_x_forwarded_host $best_http_host {
|
||||||
|
default $http_x_forwarded_host;
|
||||||
|
'' $this_host;
|
||||||
|
}
|
||||||
|
|
||||||
server_name_in_redirect off;
|
server_name_in_redirect off;
|
||||||
port_in_redirect off;
|
port_in_redirect off;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue