mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-25 12:11:33 +08:00
Add COOP/COEP for worker.js file.
This commit is contained in:
parent
d5b1899290
commit
d6da30a518
@ -2,8 +2,10 @@
|
||||
self.addEventListener("install", () => self.skipWaiting());
|
||||
self.addEventListener("activate", e => e.waitUntil(self.clients.claim()));
|
||||
self.addEventListener("fetch", e => {
|
||||
if (e.request.mode != 'navigate')
|
||||
if (e.request.mode != 'navigate' &&
|
||||
!e.request.url.includes(".worker.js")) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.respondWith((async () => {
|
||||
const response = await fetch(e.request);
|
||||
|
Loading…
Reference in New Issue
Block a user