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