chore: security hardening, mobile PWA fix & analysis expansion

- Applied strict RLS and auth validation to tracking/credit services
- Set Service Worker to Network First to fix mobile session/loading issues
- Expanded Gemini analysis summary to show distilled/bottled/batch info
- Updated SQL schema document with hardening policies
This commit is contained in:
2025-12-18 16:29:16 +01:00
parent a503e1a317
commit 22db65d109
5 changed files with 72 additions and 9 deletions

View File

@@ -30,9 +30,14 @@ self.addEventListener('activate', (event) => {
});
self.addEventListener('fetch', (event) => {
// Network first, fallback to cache
event.respondWith(
caches.match(event.request).then((response) => {
return response || fetch(event.request);
})
fetch(event.request)
.then((response) => {
return response;
})
.catch(() => {
return caches.match(event.request);
})
);
});