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 cf5d140 commit a5d6b96Copy full SHA for a5d6b96
beta_.conf
@@ -3,19 +3,14 @@ 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
-
13
- set $backend $HTTP_BACKEND_URL;
14
15
- if ($http_upgrade = 'websocket') {
16
- set $backend $WS_BACKEND_URL;
17
- }
18
- proxy_pass $backend;
+ }
+ location /ws {
+ proxy_pass $WS_BACKEND_URL;
19
proxy_http_version 1.1;
20
proxy_set_header Upgrade $http_upgrade;
21
proxy_set_header Connection "Upgrade";
0 commit comments