diff --git a/webserver/templates/locations/proxy.conf b/webserver/templates/locations/proxy.conf
index 53dce2060f536c982a6fb039268615337f30fe75..ee3566df97acaf688cc3f7e5e4782a979ca58125 100644
--- a/webserver/templates/locations/proxy.conf
+++ b/webserver/templates/locations/proxy.conf
@@ -37,7 +37,13 @@
         {% endif %}
         {# 1.1 and empty Connection to enable keepalive #}
         proxy_http_version "{{location.proxy_http_version|default('1.1')}}";
+        {% if location.allow_upgrade|default(false) %}
+        {# Upgrade allows usage of websockets #}
+        proxy_set_header Upgrade "$http_upgrade";
+        proxy_set_header Connection "$connection_upgrade";
+        {% else %}
         proxy_set_header Connection "";
+        {% endif %}
         {% if location.proxy_headers is defined %}
 
         {% for key, value in location.proxy_headers.items() %}