mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 18:59:59 +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("install", () => self.skipWaiting());
|
||||||
self.addEventListener("activate", e => e.waitUntil(self.clients.claim()));
|
self.addEventListener("activate", e => e.waitUntil(self.clients.claim()));
|
||||||
self.addEventListener("fetch", e => {
|
self.addEventListener("fetch", e => {
|
||||||
if (e.request.mode != 'navigate')
|
if (e.request.mode != 'navigate' &&
|
||||||
|
!e.request.url.includes(".worker.js")) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
e.respondWith((async () => {
|
e.respondWith((async () => {
|
||||||
const response = await fetch(e.request);
|
const response = await fetch(e.request);
|
||||||
|
Loading…
Reference in New Issue
Block a user