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