Skip to content

Commit 96c5284

Browse files
committed
Merge pull request #457 from neino3/xdomain-withcredentials
Fix to set withCredentials property to ture only if xdomain
2 parents d8351e6 + 335e8b2 commit 96c5284

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/socket.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@
149149
var xhr = io.util.request();
150150

151151
xhr.open('GET', url, true);
152-
xhr.withCredentials = true;
152+
if (this.isXDomain()) {
153+
xhr.withCredentials = true;
154+
}
153155
xhr.onreadystatechange = function () {
154156
if (xhr.readyState == 4) {
155157
xhr.onreadystatechange = empty;

0 commit comments

Comments
 (0)