WikiTree: Added creadentials: include to fetch() calls to pass auth data

This commit is contained in:
Przemek Wiech 2020-04-16 00:24:46 +02:00
parent 13ccc6c2f8
commit 0304bb127b

View File

@ -83,6 +83,7 @@ async function wikiTreeGet(request: WikiTreeRequest, handleCors: boolean) {
const response = await window.fetch(apiUrl, { const response = await window.fetch(apiUrl, {
method: 'POST', method: 'POST',
body: requestData, body: requestData,
credentials: handleCors ? undefined : 'include',
}); });
const responseBody = await response.text(); const responseBody = await response.text();
return JSON.parse(responseBody); return JSON.parse(responseBody);