socket.io, ‘Access-Control-Allow-Origin’ error

I have found a solution.
for some reason the default transportation method is not always allowed by all servers.

So i specified a neutral transportation method at the client side, like this:

var socket = io('https://yourDomain:3000', { transports : ['websocket'] });

Leave a Comment