feat: refine Scan & Taste UI, fix desktop scrolling, and resolve production login fetch error
- Reverted theme from gold to amber and restored legacy typography. - Refactored ScanAndTasteFlow and TastingEditor for robust desktop scrolling. - Hotfixed sw.js to completely bypass Supabase Auth/API requests to fix 'Failed to fetch' in production. - Integrated full tasting note persistence (tags, buddies, sessions).
This commit is contained in:
15
public/sw.js
15
public/sw.js
@@ -118,15 +118,22 @@ self.addEventListener('message', (event) => {
|
||||
|
||||
// 🚀 FETCH: Offline-First Strategy
|
||||
self.addEventListener('fetch', (event) => {
|
||||
if (event.request.method !== 'GET') return;
|
||||
|
||||
const url = new URL(event.request.url);
|
||||
|
||||
// Bypass Auth/API
|
||||
if (url.pathname.includes('/auth/') || url.pathname.includes('/api/') || url.hostname.includes('supabase.co')) {
|
||||
// CRITICAL: Bypass Auth/API/Supabase early and COMPLETELY.
|
||||
// We do not call event.respondWith() for these, letting the browser handle them natively.
|
||||
if (
|
||||
url.pathname.includes('/auth/') ||
|
||||
url.pathname.includes('/api/') ||
|
||||
url.hostname.includes('supabase.co') ||
|
||||
url.hostname.includes('auth') ||
|
||||
event.request.headers.get('Authorization')
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.request.method !== 'GET') return;
|
||||
|
||||
// RSC Data
|
||||
if (url.pathname.startsWith('/_next/data/')) {
|
||||
event.respondWith(
|
||||
|
||||
Reference in New Issue
Block a user