Fix websocket specific headers
diff --git a/nginx/files/proxy.conf b/nginx/files/proxy.conf
index 91e0a92..5110e90 100644
--- a/nginx/files/proxy.conf
+++ b/nginx/files/proxy.conf
@@ -16,14 +16,6 @@
location / {
proxy_pass {{ site.proxy.protocol }}://{{ site.proxy.host }}:{{ site.proxy.port }};
- {%- if site.proxy.websocket is defined %}
-
- proxy_set_header Host $host;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
-
- {%- else %}
-
{%- if site.proxy.size is defined %}
client_max_body_size {{ site.proxy.size }}m;
{%- if site.proxy.size > 200 %}
@@ -82,6 +74,9 @@
add_header Front-End-Https on;
{%- endif %}
+ {%- if site.proxy.websocket is defined %}
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
{%- endif %}
}