We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 109a59c commit d648fc5Copy full SHA for d648fc5
lib/socket.io/transports/xhr-polling.js
@@ -69,7 +69,7 @@ Polling.prototype._write = function(message){
69
var headers = {'Content-Type': 'text/plain; charset=UTF-8', 'Content-Length': Buffer.byteLength(message)};
70
// https://developer.mozilla.org/En/HTTP_Access_Control
71
if (this.request.headers.origin && this._verifyOrigin(this.request.headers.origin)){
72
- headers['Access-Control-Allow-Origin'] = this.request.headers.origin;
+ headers['Access-Control-Allow-Origin'] = (this.request.headers.origin === 'null' ? '*' : this.request.headers.origin);
73
if (this.request.headers.cookie) headers['Access-Control-Allow-Credentials'] = 'true';
74
}
75
this.response.writeHead(200, headers);
0 commit comments