From 80d749b7cff5bcdaff7baf899c601c7c8a5332db Mon Sep 17 00:00:00 2001
From: Andrea Dell'Amico <adellam@isti.cnr.it>
Date: Fri, 30 Nov 2018 20:10:00 +0100
Subject: [PATCH] library/roles/nginx/templates/nginx-virthost.j2: Support
 websockets inside a 'server' definition but also outside a 'location' one.

---
 nginx/templates/nginx-virthost.j2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nginx/templates/nginx-virthost.j2 b/nginx/templates/nginx-virthost.j2
index ece32e8..2787844 100644
--- a/nginx/templates/nginx-virthost.j2
+++ b/nginx/templates/nginx-virthost.j2
@@ -90,7 +90,7 @@ server {
     {% endfor %}
     {% endif %}
 
-    {% if item.websockets is defined and item.websockets %}
+    {% if nginx_websockets_support is defined and nginx_websockets_support %}
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection $connection_upgrade;
     {% endif %}