Skip to content

Commit ba41054

Browse files
authored
websockets
1 parent 5bd70f6 commit ba41054

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pritunl-nginx-proxy/nginx.conf.template

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ http {
2929

3030
location / {
3131
proxy_pass http://${PROXY_PASS_DEFAULT}:${PROXY_PORT_DEFAULT};
32+
proxy_http_version 1.1; # <-- Important for WebSocket
33+
proxy_set_header Upgrade $http_upgrade; # <-- Important for WebSocket
34+
proxy_set_header Connection "upgrade"; # <-- Important for WebSocket
3235
proxy_set_header Host $host;
3336
proxy_set_header X-Real-IP $remote_addr;
3437
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
3538
proxy_set_header X-Forwarded-Proto $scheme;
3639
}
3740

3841
# Additional location blocks can be added via environment variables
39-
# ROUTE_1_PATH, ROUTE_1_DESTINATION, etc.
4042
${ADDITIONAL_ROUTES}
4143
}
4244
}

0 commit comments

Comments
 (0)