allow Cookies with CORS requests (TODO: only for assets)

This commit is contained in:
aj 2017-08-30 21:47:13 +00:00
parent 7bb0fca116
commit 1fe8733a06
1 changed files with 2 additions and 4 deletions

View File

@ -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