WebSocket connection to 'ws:// failed:
Error during WebSocket handshake:
Unexpected response code: 400 socket.io-1.2.0.js:2
对此有任何建议,无论研究如何,我都无法找到解决此问题的方法, 任何想法在这方面出了什么问题以及如何解决
Node.js的
app.use(function(request, response, next){
response.header("Access-Control-Allow-Origin", "*");
response.header("Access-Control-Allow-Methods", "GET,PUT,POST,DELETE");
response.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, X-Auth-Token");
next();
});