Skip to content

Commit 55df645

Browse files
committed
set websocket proxy header in nginx config
1 parent 1a337cf commit 55df645

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

docker/nginx.conf

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@ http {
4343
ssl_prefer_server_ciphers on;
4444

4545
location /api {
46-
proxy_pass http://goapp;
47-
proxy_set_header Host $host;
48-
proxy_set_header X-Forwarded-Host $host;
49-
proxy_set_header X-Forwarded-Server $host;
50-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
51-
proxy_set_header X-Real-IP $remote_addr;
52-
proxy_redirect off;
53-
46+
proxy_pass http://goapp;
47+
proxy_set_header Host $host;
48+
proxy_set_header X-Forwarded-Host $host;
49+
proxy_set_header X-Forwarded-Server $host;
50+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
51+
proxy_set_header X-Real-IP $remote_addr;
52+
proxy_set_header Upgrade $http_upgrade;
53+
proxy_set_header Connection "Upgrade";
54+
proxy_redirect off;
5455
}
5556

5657
location / {

0 commit comments

Comments
 (0)