move Connection and Upgrade headers, remove 2nd location section

This commit is contained in:
Laszlo Magyar
2025-06-29 01:07:22 +02:00
parent 68c2a41b9f
commit a7255c2c5e
2 changed files with 3 additions and 8 deletions

View File

@@ -8,13 +8,10 @@ server {
location / {
proxy_pass {{ .protocol }}://backend/;
resolver 127.0.0.11 valid=180s;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
}
location /api/websocket/ {
proxy_pass {{ .protocol }}://backend/api/websocket/;
resolver 127.0.0.11 valid=180s;
# These headers must be under location section, if they moved into proxy_params.conf, even if this is valid, they won't work
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
}