A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true when opening http://socket.io/docs/logging-and-debugging/ in Chrome
Hi, When I open http://socket.io/docs/logging-and-debugging/ in Chrome, I got the following errors:
XMLHttpRequest cannot load http://slack.socket.io/socket.io/?EIO=3&transport=polling&t=LB9FyqP. A wildcard '' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://socket.io' is therefore not allowed access.(index):1 XMLHttpRequest cannot load http://slack.socket.io/socket.io/?EIO=3&transport=polling&t=LB9F-5X. A wildcard '' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://socket.io' is therefore not allowed access.(index):1 ...
There is no such error when the page is opened in Chrome Incogonito, Safari and Firefox browsers. The reason I raised this issue is because my own site has the exactly same issue. Please help.
Thanks, Jack
Important note: when responding to a credentialed request, server must specify a domain, and cannot use wild carding. The above example would fail if the header was wildcarded as: Access-Control-Allow-Origin: *.
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials
That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a fiddle reproducing the issue if possible).