Remove CORS avoidance: CORS is now okay

This commit is contained in:
Midgard 2020-03-26 16:35:33 +01:00
parent 8843f61e06
commit 099762e704
Signed by: midgard
GPG Key ID: 511C112F1331BBB4
1 changed files with 2 additions and 3 deletions

View File

@ -80,9 +80,8 @@ function getJson(url, options={}) {
function postJson(url, data=undefined, options={}) {
if (!options.headers) options.headers = {};
// This triggers CORS, which is not acceptable
//options.headers["Content-Type"] = MIME_JSON;
//options.headers["Accept"] = MIME_JSON;
options.headers["Content-Type"] = MIME_JSON;
options.headers["Accept"] = MIME_JSON;
return new Promise((resolve, reject) => {
let xhr = xhrInitForPromise(resolve, reject, url, "POST", options.headers);