feat: add listing edit mode with owner detection, fix service worker API caching for external domain
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const CACHE_NAME = 'dgray-v28';
|
||||
const CACHE_NAME = 'dgray-v29';
|
||||
const STATIC_ASSETS = [
|
||||
'/',
|
||||
'/index.html',
|
||||
@@ -57,7 +57,13 @@ self.addEventListener('fetch', (event) => {
|
||||
|
||||
if (request.method !== 'GET') return;
|
||||
|
||||
// API calls: Network First
|
||||
// API calls: Network First (external API domain)
|
||||
if (url.hostname === 'api.dgray.io') {
|
||||
event.respondWith(networkFirst(request));
|
||||
return;
|
||||
}
|
||||
|
||||
// Legacy: API calls via path
|
||||
if (url.pathname.includes('/api/')) {
|
||||
event.respondWith(networkFirst(request));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user