diff --git a/ansible/roles/nginx/files/includes/proxy.conf b/ansible/roles/nginx/files/includes/proxy.conf index cde9479..b5e40f7 100644 --- a/ansible/roles/nginx/files/includes/proxy.conf +++ b/ansible/roles/nginx/files/includes/proxy.conf @@ -32,3 +32,9 @@ proxy_set_header X-Forwarded-Uri $request_uri; proxy_set_header X-Original-Method $request_method; proxy_set_header X-Original-URL $scheme://$http_host$request_uri; proxy_set_header X-Real-IP $remote_addr; + +# Helper variable for proxying websockets. +map $http_upgrade $connection_upgrade { + default upgrade; + '' close; +}