This commit is contained in:
贺博 2017-06-21 03:41:32 +00:00 committed by GitHub
commit d9978ea367

View file

@ -137,12 +137,12 @@ http {
map $pass_access_scheme $the_x_forwarded_for { map $pass_access_scheme $the_x_forwarded_for {
default $remote_addr; default $remote_addr;
https $proxy_protocol_addr; # https $proxy_protocol_addr;
} }
map $pass_access_scheme $the_real_ip { map $pass_access_scheme $the_real_ip {
default $remote_addr; default $remote_addr;
https $proxy_protocol_addr; # https $proxy_protocol_addr;
} }
# map port 442 to 443 for header X-Forwarded-Port # map port 442 to 443 for header X-Forwarded-Port
@ -166,12 +166,18 @@ http {
text text/plain; text text/plain;
} }
# Obtain best http host # Obtain CUSTOM host (PHOST)
map $http_host $best_http_host { map $http_phost $best_http_host {
default $http_host; default $http_phost;
'' $host; '' $host;
} }
# Obtain best http host
#map $http_host $best_http_host {
# default $http_host;
# '' $host;
#}
server_name_in_redirect off; server_name_in_redirect off;
port_in_redirect off; port_in_redirect off;