Closed dividerbeam closed 3 years ago
Try config
location /socket.io {
proxy_pass http://myServerIP:2020;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
}
Client side: var socket = io('https://'+document.domain);
thank you very much!
Client side:
var socket = io('https://'+document.domain+'/socket.io/');
Nginx:
and result:
server answer:
96:0{"sid":"VlC_PZXQOS4w8sowB6Yt","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}
i think problem with "sid", its not saved after first connect, but i dk how fix that
help plz