diff --git a/src/lib/lemmy.svelte.ts b/src/lib/lemmy.svelte.ts index 0345d07d..260bb992 100644 --- a/src/lib/lemmy.svelte.ts +++ b/src/lib/lemmy.svelte.ts @@ -36,12 +36,17 @@ async function customFetch( ): Promise { const f = func ? func : fetch - if (init) + if (init) { init.headers = { ...init.headers, ...(auth ? { authorization: `Bearer ${auth}` } : {}), } + if (auth) { + init.cache = 'no-store' + } + } + if (init?.body && auth) { try { const json = JSON.parse(init.body.toString())