| # 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; | |
| } |