Closed throrin19 closed 10 years ago
have you looked at https://github.com/jpillora/xdomain#faq--troubleshooting ? is there a demo running anywhere?
Yes. It works fine if i don't try to connect on socket.io.
This is my config :
client side :
<!DOCTYPE html>
<head>
...
<!--[if lte IE 10]>
<script type="text/javascript" src="js/libs/vendors/xdomain/dist/0.6/xdomain.min.js" slave="http://api.foo.com/v1.1/proxy"></script>
<script type="text/javascript">
xdomain.debug = true;
</script>
<![endif]-->
</head>
<body>
</body>
</html>
server side on /v1.1/proxy :
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script src="js/libs/vendors/xdomain.min.js" master="http://client.foo.com"></script>
</head>
<body>
</body>
</html>
Client and server side are differents.
this is my expressJS CORS configuration for headers :
var corsOptions = {
methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"],
origin : true
//credentials: true,
//allowedHeaders : "X-CSRF-Token, X-Requested-With, Origin, Accept, Accept-Encoding, Accept-Version, Content-Length, Content-MD5, Content-Type, evt-id, api-key, del-all, mod-id"
};
this.use(cors(corsOptions));
under IE, does socketio use flash for websockets? what about cross-domain websockets? xdomain only replaces XMLHttpRequest
xdomain doesn't use CORS in anyway, it implements CORS-like functionality with an alternate method
since im not sure what socketio is doing, im not sure where its going wrong
On Thu, May 22, 2014 at 11:58 PM, Benjamin Besse notifications@github.comwrote:
Yes. It works fine if i don't try to connect on socket.io. I have this problem only if i use socket.io. I don't understand the bug.
This is my config :
client side :
<!DOCTYPE html>
...
Hello, in my project i have a problem with socket.io and your library.
If i activate socket.io, xdomain crash with the Access Denied error and the 'no slave matching'.
If i remove socket.io, i have no problem.
Have you an idea of my problem ?