ERS enable CORS

sujata Member asked 2 years ago

I added 
io.set(‘origins’, ‘*:*’);
 
in ers.js file to enable CORS. However still the client browser gets error as 
XMLHttpRequest cannot load https://mydomain/socket.io/?EIO=3&transport=polling&t=LtcoXHr. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘https://mydomain’ is therefore not allowed access.
And on the ndoe console I get 
info – unhandled socket.io url

1 Answers
sujata Member answered 2 years ago

I got it resolved by referring socket.io.js from the ERS domain to the client html page. The error was because I was linking local socket io reference, which is a different domain to ERS.