Change $host to $http_host

This commit is contained in:
Erope 2022-05-31 16:50:04 +08:00
parent ae01b41eca
commit b6a40bb7d0
No known key found for this signature in database
GPG Key ID: 934F29AB0411C0E9
2 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ to open the management script
#PROXY-START/
location / {
proxy_pass http://127.0.0.1:8008;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
}
location ~ ^/(ws|terminal/.+)$ {
@ -68,7 +68,7 @@ location ~ ^/(ws|terminal/.+)$ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header Host $http_host;
}
#PROXY-END/
````

View File

@ -74,7 +74,7 @@ curl -L https://jihulab.com/nezha/nezha/-/raw/master/script/install.sh -o nezha.
#PROXY-START/
location / {
proxy_pass http://127.0.0.1:8008;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
}
location ~ ^/(ws|terminal/.+)$ {
@ -82,7 +82,7 @@ location ~ ^/(ws|terminal/.+)$ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header Host $http_host;
}
#PROXY-END/
````