Improve the nginx websocket proxy example

Include the full `proxy-pass` directive (continuing the example) and
set the `Host` header.

Issue #175 Websocket upgrade: websocket: request origin not allowed by
    Upgrader.CheckOrigin
This commit is contained in:
Jesse Bickel authored and Juliusz Chroboczek committed 2025-10-15 12:32:08 +02:00
1 parent b0b4ff484e
commit 7cf95c7f86
1 file changed
+2 -1
+2 -1
View File
@@ -264,9 +264,10 @@ example, with Nginx, you will need to say something like the following:
```
location /ws {
proxy_pass ...;
proxy_pass https://localhost:8443/ws;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
}
```