fix(auth, web-app): update Keycloak config secrets and improve SW cache handling
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 7m17s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 6m42s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 1m58s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m44s

- Updated `keycloak/meldestelle-realm.json` to replace dynamic secrets with static values for local testing.
- Incremented service worker cache version to `v4` and added bypass rules for API requests and app bundles to prevent outdated data.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
2026-03-17 10:41:32 +01:00
parent 28cd5d8afa
commit 119af6fd6b
2 changed files with 10 additions and 4 deletions
@@ -1,6 +1,6 @@
const IS_DEV = self.location.hostname === 'localhost' || self.location.hostname === '127.0.0.1' || self.location.hostname === '::1';
const CACHE_NAME = 'meldestelle-cache-v3';
const CACHE_NAME = 'meldestelle-cache-v4';
const PRECACHE_URLS = [
'/',
'/index.html',
@@ -75,6 +75,12 @@ self.addEventListener('fetch', (event) => {
return;
}
// API-Requests immer direkt vom Netzwerk niemals aus dem Cache (Auth-Header müssen erhalten bleiben)
if (url.pathname.startsWith('/api/')) {
event.respondWith(fetch(req));
return;
}
// App-Bundle immer vom Netzwerk niemals aus dem Cache (verhindert veraltete JS-Versionen)
if (url.pathname.endsWith('web-app.js') || url.pathname.endsWith('web-app.js.map')) {
event.respondWith(fetch(req));