File size: 425 Bytes
d988ae4
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
# unfortunately nextjs cant proxy websocket. so we have to use nginx to proxy it
# /api is proxied by nextjs in next.config.js
# docker0.local is my internal docker network

location /socket.io {
    proxy_pass http://docker0.local:3001;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
}