Skip to content

Commit 421934e

Browse files
committed
Move 'Allow Websockets' definitions to host root configuration
This fixes issues with these settings not applying to custom locations defined under hosts.
1 parent f056b9d commit 421934e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

backend/templates/proxy_host.conf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ server {
1313
{% include "_hsts.conf" %}
1414
{% include "_forced_ssl.conf" %}
1515

16+
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
17+
proxy_set_header Upgrade $http_upgrade;
18+
proxy_set_header Connection $http_connection;
19+
proxy_http_version 1.1;
20+
{% endif %}
21+
22+
1623
access_log /data/logs/proxy_host-{{ id }}.log proxy;
1724

1825
{{ advanced_config }}
@@ -46,12 +53,6 @@ server {
4653

4754
{% include "_hsts.conf" %}
4855

49-
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
50-
proxy_set_header Upgrade $http_upgrade;
51-
proxy_set_header Connection $http_connection;
52-
proxy_http_version 1.1;
53-
{% endif %}
54-
5556
# Proxy!
5657
include conf.d/include/proxy.conf;
5758
}

0 commit comments

Comments
 (0)