From 8e1a203df2c9cab1ce03a52c2f71c649192a3d47 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 21 Dec 2023 16:13:57 +0000 Subject: [PATCH] Add helper map for better websocket support --- ansible/roles/nginx/files/includes/proxy.conf | 6 ++++++ 1 file changed, 6 insertions(+) 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; +}