Skip to content

Commit

Permalink
Fixed xDomain detection (fixes #462 from socket.io).
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Sep 3, 2011
1 parent 27ed6ca commit 43f9d29
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,10 @@
return false;
// end node

var locPort = window.location.port || 80;
return this.options.host !== document.domain || this.options.port != locPort;
var port = window.location.port ||
('https:' == window.location.protocol ? 443 : 80);

return this.options.host !== document.domain || this.options.port != port;
};

/**
Expand Down

0 comments on commit 43f9d29

Please sign in to comment.