Skip to content

Commit

Permalink
Move map block out of server block
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-lloyd03 committed Sep 6, 2022
1 parent 45df6e7 commit 0fe3c21
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/reverse-proxy.md
Expand Up @@ -24,6 +24,12 @@ tls_key_path: ""
The following example configuration can be used in your nginx setup, substituting values as necessary. `<IP:PORT>` 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;
Expand All @@ -37,12 +43,6 @@ server {
ssl_certificate_key <PATH_CERT_KEY>;
ssl_protocols TLSv1.2 TLSv1.3;
map $http_upgrade $connection_upgrade {
default keep-alive;
'websocket' upgrade;
'' close;
}
location / {
proxy_pass http://<IP:PORT>;
proxy_http_version 1.1;
Expand Down

0 comments on commit 0fe3c21

Please sign in to comment.