From 0fe3c21223d22ac46e433507f405cbd6f77b8f26 Mon Sep 17 00:00:00 2001 From: Mike Lloyd Date: Tue, 6 Sep 2022 16:12:20 -0700 Subject: [PATCH] Move map block out of server block --- docs/reverse-proxy.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/reverse-proxy.md b/docs/reverse-proxy.md index 1f66d3c2..0809d044 100644 --- a/docs/reverse-proxy.md +++ b/docs/reverse-proxy.md @@ -24,6 +24,12 @@ tls_key_path: "" The following example configuration can be used in your nginx setup, substituting values as necessary. `` should be the IP address and port where headscale is running. In most cases, this will be `http://localhost:8080`. ```Nginx +map $http_upgrade $connection_upgrade { + default keep-alive; + 'websocket' upgrade; + '' close; +} + server { listen 80; listen [::]:80; @@ -37,12 +43,6 @@ 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;