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) {
|
||||
xhr.upload.onprogress = function (ev) {
|
||||
console.log('[progress]');
|
||||
console.log(ev);
|
||||
preq.progress({
|
||||
loaded: ev.loaded
|
||||
, total: ev.total
|
||||
|
@ -932,6 +928,8 @@
|
|||
};
|
||||
}
|
||||
xhr.open(preq.method || 'GET', preq.url, true);
|
||||
// For assets.example.com/assets
|
||||
xhr.withCredentials = true;
|
||||
|
||||
if (preq.data) {
|
||||
headers['Content-Type'] = 'application/json'; // TODO XXX TODO utf8
|
||||
|
|
Loading…
Reference in New Issue