Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
"Cannot make request to different domain" a bit too drastic #69
An API I use (socket.io) issues some XHR calls using URLs that look like http://:8000/socket.io/... The implemenation of open in xhr.coffee, when testing for cross site request, ends up trying to compare ":8000" with "localhost:8000".
I've ended up adding the following:
I'm not quite sure that changing url.host is the best option here though.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Even then it can still break on port 80, url.host ends up looking like 'localhost:80' while window.location.host is just 'localhost'. I had to add an additional condition in the unless to obtain the following patch: