ERS enable CORS

ERS enable CORS

admin Staff 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
admin Staff 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.

Offcanvas

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.