Skip to content

Commit 335e8b2

Browse files
committed
set withCredentials to ture only if xdomain
1 parent d8351e6 commit 335e8b2

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)