From c66cf02db499e64153adcfabfac58683cd38bec2 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Mon, 15 May 2023 09:46:22 -0400 Subject: [PATCH] Fix config.json being cached --- src/hooks/useWebConfig.tsx | 2 +- src/scripts/settings/webSettings.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useWebConfig.tsx b/src/hooks/useWebConfig.tsx index 528afcee0f..1864b29810 100644 --- a/src/hooks/useWebConfig.tsx +++ b/src/hooks/useWebConfig.tsx @@ -13,7 +13,7 @@ export const WebConfigProvider: FC = ({ children }) => { useEffect(() => { const fetchConfig = async () => { try { - const response = await fetchLocal('config.json', { cache: 'no-cache' }); + const response = await fetchLocal('config.json', { cache: 'no-store' }); if (!response.ok) { throw new Error('network response was not ok'); diff --git a/src/scripts/settings/webSettings.js b/src/scripts/settings/webSettings.js index ac3ef0fbad..329a56e62a 100644 --- a/src/scripts/settings/webSettings.js +++ b/src/scripts/settings/webSettings.js @@ -7,7 +7,7 @@ async function getConfig() { if (data) return Promise.resolve(data); try { const response = await fetchLocal('config.json', { - cache: 'no-cache' + cache: 'no-store' }); if (!response.ok) {