-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
The real problem I'm having is that socket.io-client is unable to connect via the polling transport when running the chrome debugger. This is because it's a cross-domain request (debugger port is 8081 whereas my local server is running on port 3000) and socket.io in that case will only use XMLHttpRequest if it supports CORS.
socket.io-client checks for CORS like this:
module.exports = typeof XMLHttpRequest !== 'undefined' &&
'withCredentials' in new XMLHttpRequest();
which fails and ultimately it has to fall back on WS. That isn't so terrible but made for some very confusing debugging. I'd prefer for the behavior while debugging to be as close as possible to running the real app.
Am happy to submit a PR if this makes sense. (FYI this is on react-native 0.18.0-rc)
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.