mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-02-18 02:55:48 +00:00
WikiTree: Added creadentials: include to fetch() calls to pass auth data
This commit is contained in:
parent
13ccc6c2f8
commit
0304bb127b
@ -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);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user