-
Notifications
You must be signed in to change notification settings - Fork 562
Closed
Description
Hi,
When doing a CORS polling request, if the request fails the verification (here), the browser does not show the error returned by engine.io but show a CORS error instead.
This makes troubleshooting very difficult.
I believe that this is happening because the CORS headers are added only when the request is recognized as xhr-polling.
The CORS headers are supposedly added during the handshake.
Steps to reproduce
2 domains: subA.domain.com subB.domain.com
// this request emerged from a webpage on subA.domain.com
$.get(
'https://subB.domain.com/engine.io/?EIO=2&transport=polling&sid=thisSidIsNotValid'
);
XMLHttpRequest cannot load https://subB.domain.com/engine.io/?EIO=2&transport=polling&sid=thisSidIsNotValid. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://subA.domain.com' is therefore not allowed access.
Not sure how easy it would be to fix this.
It's happening with engine.io 0.7.9 but after looking at the code I believe it should be reproducible on the current master branch.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels