You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello. I am creating a simple server with socket.io + express, but when i start the server, only the browser client can connect, while the Node.js client (socket.io-client) cannot. Does anyone know what's happening?
in case you noticed, I'm starting the server on port 80 but the host switches to 443 automatically with cloudflare proxy, if that was the problem neither of the 2 clients would have worked. Also, the browser client is not on the same URL as the server, so it wouldn't be a CORS problem.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hello. I am creating a simple server with socket.io + express, but when i start the server, only the browser client can connect, while the Node.js client (socket.io-client) cannot. Does anyone know what's happening?
my node.js server code:
My browser client code (can connect and work normally):
My node.js client code (timeout error, cant connect):
in case you noticed, I'm starting the server on port 80 but the host switches to 443 automatically with cloudflare proxy, if that was the problem neither of the 2 clients would have worked. Also, the browser client is not on the same URL as the server, so it wouldn't be a CORS problem.
Browser client response:
Node.js client response:
Beta Was this translation helpful? Give feedback.
All reactions