Fix auth
parent
820638f79f
commit
59ff0643b0
|
@ -97,11 +97,11 @@ self.addEventListener("fetch", (event: any) => {
|
||||||
return fetch(request);
|
return fetch(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this is a /*.* request, this can either be a plug worker load or an attachment load
|
if (pathname === "/.auth" || pathname === "/index.json") {
|
||||||
if (/\/.+\.[a-zA-Z]+$/.test(pathname)) {
|
|
||||||
return handleLocalFileRequest(request, pathname);
|
|
||||||
} else if (pathname === "/.auth") {
|
|
||||||
return fetch(request);
|
return fetch(request);
|
||||||
|
} else if (/\/.+\.[a-zA-Z]+$/.test(pathname)) {
|
||||||
|
// If this is a /*.* request, this can either be a plug worker load or an attachment load
|
||||||
|
return handleLocalFileRequest(request, pathname);
|
||||||
} else {
|
} else {
|
||||||
// Must be a page URL, let's serve index.html which will handle it
|
// Must be a page URL, let's serve index.html which will handle it
|
||||||
return (await caches.match(precacheFiles["/"])) || fetch(request);
|
return (await caches.match(precacheFiles["/"])) || fetch(request);
|
||||||
|
|
Loading…
Reference in New Issue