From 34b09a2d1134d48d7733a3d11a9e6f3f15d080a9 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Tue, 3 Sep 2024 01:26:24 +0200 Subject: [PATCH] Add credentials to settings fetch --- src/routes/+page.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index f2d0b27..af0fc9e 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -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);