Merge pull request #911 from aledbf/fix-forwarder-host
Improve X-Forwarded-Host support
This commit is contained in:
commit
05e460012d
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue