allow Cookies with CORS requests (TODO: only for assets)
This commit is contained in:
parent
7bb0fca116
commit
1fe8733a06
|
@ -915,12 +915,8 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log('$$$$$$$$$$$$$$$$$$$$$$$$ preq.progress:');
|
|
||||||
console.log(preq.progress);
|
|
||||||
if (preq.progress) {
|
if (preq.progress) {
|
||||||
xhr.upload.onprogress = function (ev) {
|
xhr.upload.onprogress = function (ev) {
|
||||||
console.log('[progress]');
|
|
||||||
console.log(ev);
|
|
||||||
preq.progress({
|
preq.progress({
|
||||||
loaded: ev.loaded
|
loaded: ev.loaded
|
||||||
, total: ev.total
|
, total: ev.total
|
||||||
|
@ -932,6 +928,8 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
xhr.open(preq.method || 'GET', preq.url, true);
|
xhr.open(preq.method || 'GET', preq.url, true);
|
||||||
|
// For assets.example.com/assets
|
||||||
|
xhr.withCredentials = true;
|
||||||
|
|
||||||
if (preq.data) {
|
if (preq.data) {
|
||||||
headers['Content-Type'] = 'application/json'; // TODO XXX TODO utf8
|
headers['Content-Type'] = 'application/json'; // TODO XXX TODO utf8
|
||||||
|
|
Loading…
Reference in New Issue