nginx-virthost: Fix a problem with the websockets configuration.

This commit is contained in:
Andrea Dell'Amico 2018-04-23 17:48:57 +02:00
parent 1ab0f69b05
commit b0d65d4a17
1 changed files with 4 additions and 4 deletions

View File

@ -194,10 +194,6 @@ server {
{% endfor %}
{% endif %}
{% if item.websockets is defined and item.websockets %}
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
{% endif %}
{% if item.proxy_standard_setup is defined and item.proxy_standard_setup %}
# Proxy stuff
{% if item.include_global_proxy_conf is defined and not item.include_global_proxy_conf %}
@ -222,6 +218,10 @@ server {
{% if location.target is defined %}
proxy_pass {{ location.target }};
{% endif %}
{% if location.websockets is defined and location.websockets %}
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
{% endif %}
{% if location.extra_conf is defined %}
{{ location.extra_conf }}
{% endif %}