We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 369eb3d commit 702fb76Copy full SHA for 702fb76
beta_.conf
@@ -3,13 +3,19 @@ server {
3
server_name localhost;
4
5
set $WS_BACKEND_URL ws://localhost:4000;
6
+ set $HTTP_BACKEND_URL http://localhost:4000;
7
8
location / {
9
root /usr/share/nginx/html;
10
index index.html index.htm;
11
try_files $uri /index.html;
12
- proxy_pass $WS_BACKEND_URL;
13
+ set $backend $HTTP_BACKEND_URL;
14
+
15
+ if ($http_upgrade = 'websocket') {
16
+ set $backend $WS_BACKEND_URL
17
+ }
18
+ proxy_pass $backend;
19
proxy_http_version 1.1;
20
proxy_set_header Upgrade $http_upgrade;
21
proxy_set_header Connection "Upgrade";
0 commit comments