Add credentials to settings fetch

This commit is contained in:
Djuri Baars 2024-09-03 01:26:24 +02:00
parent 1dd3a7f834
commit 34b09a2d11

View file

@ -33,7 +33,7 @@
});
const fetchStatusData = () => {
fetch(`${PUBLIC_BASE_URL}/api/status`)
fetch(`${PUBLIC_BASE_URL}/api/status`, { credentials: 'same-origin' })
.then((res) => res.json())
.then((data) => {
status.set(data);
@ -41,7 +41,7 @@
};
const fetchSettingsData = () => {
fetch(PUBLIC_BASE_URL + `/api/settings`)
fetch(PUBLIC_BASE_URL + `/api/settings`, { credentials: 'same-origin' })
.then((res) => res.json())
.then((data) => {
data.fgColor = String(data.fgColor);