Skip to content

Commit

Permalink
Merge pull request socketio#335 from gavinuhma/auth-fix
Browse files Browse the repository at this point in the history
set withCredentials to true before xhr to fix authentication
  • Loading branch information
rauchg committed Nov 22, 2011
2 parents 4375ef1 + 336430a commit e7fc25e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/socket.js
Expand Up @@ -149,6 +149,7 @@
var xhr = io.util.request(); var xhr = io.util.request();


xhr.open('GET', url, true); xhr.open('GET', url, true);
xhr.withCredentials = true;
xhr.onreadystatechange = function () { xhr.onreadystatechange = function () {
if (xhr.readyState == 4) { if (xhr.readyState == 4) {
xhr.onreadystatechange = empty; xhr.onreadystatechange = empty;
Expand Down

0 comments on commit e7fc25e

Please sign in to comment.