mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Merge branch 'master' of https://github.com/tifroz/Socket.IO-node into tifroz-master
This commit is contained in:
@@ -69,7 +69,7 @@ Polling.prototype._write = function(message){
|
||||
var headers = {'Content-Type': 'text/plain; charset=UTF-8', 'Content-Length': Buffer.byteLength(message)};
|
||||
// https://developer.mozilla.org/En/HTTP_Access_Control
|
||||
if (this.request.headers.origin && this._verifyOrigin(this.request.headers.origin)){
|
||||
headers['Access-Control-Allow-Origin'] = this.request.headers.origin;
|
||||
headers['Access-Control-Allow-Origin'] = (this.request.headers.origin === 'null' ? '*' : this.request.headers.origin);
|
||||
if (this.request.headers.cookie) headers['Access-Control-Allow-Credentials'] = 'true';
|
||||
}
|
||||
this.response.writeHead(200, headers);
|
||||
|
||||
Reference in New Issue
Block a user