Merge pull request #911 from aledbf/fix-forwarder-host

Improve X-Forwarded-Host support
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-06-27 12:43:59 -04:00 committed by GitHub
commit 05e460012d

View file

@ -169,11 +169,16 @@ http {
}
# Obtain best http host
map $http_host $best_http_host {
map $http_host $this_host {
default $http_host;
'' $host;
}
map $http_x_forwarded_host $best_http_host {
default $http_x_forwarded_host;
'' $this_host;
}
server_name_in_redirect off;
port_in_redirect off;