From 5af2141f7b5b729eacfa2a45be84834da88cafdf Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Thu, 17 Aug 2023 15:32:14 +0300 Subject: [PATCH] skip caches for config --- apps/red-ui/src/main.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/main.ts b/apps/red-ui/src/main.ts index c0be9a104..5bb079b55 100644 --- a/apps/red-ui/src/main.ts +++ b/apps/red-ui/src/main.ts @@ -34,8 +34,9 @@ async function bootstrap(appConfig: AppConfig, version: { FRONTEND_APP_VERSION: } } -const versionPromise = fetch('/ui/assets/version/version.json').then(resp => resp.json()); -const configPromise = fetch('/ui/assets/config/config.json').then(resp => resp.json()); +const randomNr = Math.random().toFixed(2); +const versionPromise = fetch(`/ui/assets/version/version.json?skipCache=${randomNr}`).then(resp => resp.json()); +const configPromise = fetch(`/ui/assets/config/config.json?skipCache=${randomNr}`).then(resp => resp.json()); Promise.all([configPromise, versionPromise]) .then(([appConfig, version]) => bootstrap(appConfig, version))