mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
move Connection and Upgrade headers, remove 2nd location section
This commit is contained in:
@@ -7,9 +7,7 @@ proxy_send_timeout 30m;
|
||||
proxy_max_temp_file_size 0;
|
||||
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Origin $http_origin;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user