Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit e9c9f54

Browse files
committed
added option withCredentials for CORS request, dist/rx.dom.js
1 parent 796e2f9 commit e9c9f54

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dist/rx.dom.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
function getCORSRequest() {
258258
var xhr = new root.XMLHttpRequest();
259259
if ('withCredentials' in xhr) {
260-
xhr.withCredentials = true;
260+
xhr.withCredentials = this.withCredentials ? true : false;
261261
return xhr;
262262
} else if (!!root.XDomainRequest) {
263263
return new XDomainRequest();
@@ -436,8 +436,9 @@
436436
headers: {},
437437
responseType: 'text',
438438
timeout: 0,
439+
withCredentials: false,
439440
createXHR: function(){
440-
return this.crossDomain ? getCORSRequest() : getXMLHttpRequest()
441+
return this.crossDomain ? getCORSRequest.call(this) : getXMLHttpRequest()
441442
},
442443
normalizeError: normalizeAjaxErrorEvent,
443444
normalizeSuccess: normalizeAjaxSuccessEvent
@@ -1383,4 +1384,4 @@
13831384
}());
13841385

13851386
return Rx;
1386-
}));
1387+
}));

0 commit comments

Comments
 (0)