Skip to content

Commit 43a3870

Browse files
authored
Merge pull request #22 from srghma/feat_websocket_proxying
feat: websocket proxying support -> add
2 parents 9483ec4 + 494a0b5 commit 43a3870

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: snippets/server-proxy.conf

+9
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,26 @@
22
# specified using $SITES variable
33
# more in README
44

5+
map $http_upgrade $connection_upgrade {
6+
default upgrade;
7+
'' close;
8+
}
9+
510
server {
611
listen 443 ssl http2;
712
server_name $SERVER_NAME;
813

914
include resty-server-https.conf;
1015

1116
location / {
17+
proxy_http_version 1.1;
1218
proxy_pass http://$SERVER_ENDPOINT;
1319
proxy_set_header Host $host;
1420
proxy_set_header X-Real-IP $remote_addr;
1521
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
1622
proxy_set_header X-Forwarded-Proto $scheme;
23+
proxy_set_header Upgrade $http_upgrade;
24+
proxy_set_header Connection $connection_upgrade;
25+
proxy_cache_bypass $http_upgrade;
1726
}
1827
}

0 commit comments

Comments
 (0)