-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
Description
贴个配置如下:
domain www.tanzhixuan2018.top {
location / {
proxy_pass http://$ip/;
}
location /to {
proxy_set_header Host hiproxy.org; # [conf1]
proxy_pass http://hiproxy.org/zh-cn/get_started/cli_options.html;
}
location /login {
proxy_pass https://$ip/qfc-pm/login/;
proxy_set_header from 'hiproxy';
set_header proxy 'hiproxy';
}
}如上述代码,在 [conf1] 注释的情况下,代理会默认使用源请求的Host,导致访问目的服务器时仍然带着源请求的Host,致使访问失败。现在只能手动设置Host。
望添加根据proxy_pass 自动添加代理Host的功能。谢谢。