From dc18d64286534f8f9bfb013a3e4e6773b46d2afe Mon Sep 17 00:00:00 2001 From: Mike Lloyd Date: Sun, 4 Sep 2022 17:26:33 -0700 Subject: [PATCH] Add websockets config --- docs/reverse-proxy.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/reverse-proxy.md b/docs/reverse-proxy.md index c9a1d1b7..0dbd75fe 100644 --- a/docs/reverse-proxy.md +++ b/docs/reverse-proxy.md @@ -29,8 +29,17 @@ server { ssl_certificate_key ; ssl_protocols TLSv1.2 TLSv1.3; + map $http_upgrade $connection_upgrade { + default keep-alive; + 'websocket' upgrade; + '' close; + } + location / { proxy_pass http://; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; proxy_set_header Host $server_name; proxy_redirect http:// https://; proxy_buffering off;