From 60e5c9ba355162f67a29d13d079a765720e70d76 Mon Sep 17 00:00:00 2001 From: rene Date: Thu, 14 May 2026 13:08:52 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Admin-Endpoints=20umgehen=20SW-Timeout?= =?UTF-8?q?=20=E2=80=94=20kein=20'Offline'=20bei=20langen=20Jobs=20(SW=20b?= =?UTF-8?q?y-v940)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/main.py | 2 +- backend/static/js/app.js | 2 +- backend/static/sw.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/main.py b/backend/main.py index bed3d6f..482806f 100644 --- a/backend/main.py +++ b/backend/main.py @@ -406,7 +406,7 @@ async def serve_media(path: str, request: _Request): raise _HE(404, "Nicht gefunden.") return _media_response(filepath) -APP_VER = "939" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "940" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/static/js/app.js b/backend/static/js/app.js index cd79577..12d4361 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '939'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '940'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.5.1'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; // Cache-Bust-Parameter nach Update-Reload sofort entfernen diff --git a/backend/static/sw.js b/backend/static/sw.js index cf6d85e..8241dc5 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v939'; +const CACHE_VERSION = 'by-v940'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache @@ -238,6 +238,8 @@ self.addEventListener('fetch', event => { // Media-Uploads + KI-Endpoints: direkt ans Netzwerk — kein Clone, kein Timeout, kein Queue // KI-Anfragen ans lokale LLM können mehrere Minuten dauern if (method === 'POST' && (_isMediaUpload(event.request) || url.pathname.startsWith('/api/ki/') || url.pathname.includes('/health/ki-') || url.pathname.includes('/health/symptom'))) return; + // Admin-Endpoints: kein SW-Timeout, direkt ans Netzwerk + if (url.pathname.startsWith('/api/admin/')) return; // Mutationen (POST/PATCH/PUT/DELETE): mit Timeout, bei Offline → Queue if (['POST', 'PATCH', 'PUT', 'DELETE'].includes(method)) {