fix: exclude appsettings from service worker cache
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled

appsettings*.json files were cached by the service worker, causing
stale GwUrl (cms.kbs1.ir) to persist in the browser even after the
server files were updated. Now appsettings files are always fetched
fresh from the server, where the entrypoint injects the correct GW_URL.
This commit is contained in:
masoodafar-web
2026-03-15 03:07:14 +03:30
parent b3e6066c90
commit 9699833ac9
@@ -9,7 +9,7 @@ self.addEventListener('fetch', event => event.respondWith(onFetch(event)));
const cacheNamePrefix = 'offline-cache-';
const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}`;
const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/ ];
const offlineAssetsExclude = [ /^service-worker\.js$/ ];
const offlineAssetsExclude = [ /^service-worker\.js$/, /^appsettings.*\.json$/ ];
async function onInstall(event) {
console.info('Service worker: Install');