mirror of
https://github.com/immich-app/immich
synced 2025-06-08 06:20:59 +00:00
review comments
This commit is contained in:
parent
b71e2da3f9
commit
0a8dd1cfe9
@ -19,10 +19,6 @@ export function handleFetchEvent(event: FetchEvent): void {
|
|||||||
|
|
||||||
const url = new URL(event.request.url);
|
const url = new URL(event.request.url);
|
||||||
|
|
||||||
if (isIgnoredFileType(url.pathname) || isIgnoredPath(url.pathname)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (APP_RESOURCES.includes(url.pathname)) {
|
if (APP_RESOURCES.includes(url.pathname)) {
|
||||||
event.respondWith(getCachedOrFetch(event.request));
|
event.respondWith(getCachedOrFetch(event.request));
|
||||||
return;
|
return;
|
||||||
@ -33,6 +29,10 @@ export function handleFetchEvent(event: FetchEvent): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isIgnoredFileType(url.pathname) || isIgnoredPath(url.pathname)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const slash = new URL('/', url.origin);
|
const slash = new URL('/', url.origin);
|
||||||
event.respondWith(getCachedOrFetch(slash));
|
event.respondWith(getCachedOrFetch(slash));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user