Fix: KI-Endpoints + Symptom-Check am SW-Timeout vorbei (kein 10s Limit für LLM) — SW by-v799

This commit is contained in:
rene 2026-05-09 20:12:53 +02:00
parent c1bcc029ea
commit e20e691c4d
3 changed files with 6 additions and 5 deletions

View file

@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache
============================================================ */
const CACHE_VERSION = 'by-v798';
const CACHE_VERSION = 'by-v799';
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
@ -230,8 +230,9 @@ self.addEventListener('fetch', event => {
return;
}
// Media-Uploads: direkt ans Netzwerk — kein Clone, kein Timeout, kein Queue
if (method === 'POST' && _isMediaUpload(event.request)) return;
// 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;
// Mutationen (POST/PATCH/PUT/DELETE): mit Timeout, bei Offline → Queue
if (['POST', 'PATCH', 'PUT', 'DELETE'].includes(method)) {