Skip to content

Fix for COR #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
4 commits merged into from
Oct 1, 2010
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/socket.io/transports/xhr-multipart.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Multipart.prototype._onConnect = function(req, res){
var self = this, body = '', headers = {};
// https://developer.mozilla.org/En/HTTP_Access_Control
if (req.headers.origin && this._verifyOrigin(req.headers.origin)){
headers['Access-Control-Allow-Origin'] = req.headers.origin;
headers['Access-Control-Allow-Origin'] = '*';
headers['Access-Control-Allow-Credentials'] = 'true';
}
if (typeof req.headers['access-control-request-method'] !== 'undefined'){
Expand Down
2 changes: 1 addition & 1 deletion lib/socket.io/transports/xhr-polling.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Polling.prototype._onConnect = function(req, res){
var headers = {'Content-Type': 'text/plain'};
if (req.headers.origin){
if (self._verifyOrigin(req.headers.origin)){
headers['Access-Control-Allow-Origin'] = req.headers.origin;
headers['Access-Control-Allow-Origin'] = '*';
if (req.headers.cookie) headers['Access-Control-Allow-Credentials'] = 'true';
} else {
res.writeHead(401);
Expand Down
17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ "name" : "socket.io"
, "description" : "Sockets for the rest of us."
, "version" : "0.5.2"
, "author" : "LearnBoost"
, "licenses" :
[ { "type" : "MIT"
, "url" : "http://github.com/maccman/Socket.IO-node/raw/master/README.md"
}
]
, "repository" :
{ "type" : "git"
, "url" : "http://github.com/maccman/Socket.IO-node.git"
}
, "engine" : [ "node >=0.1.102" ]
, "main" : "./index"
, "scripts" : { "test" : "make test" }
}