Skip to content
Snippets Groups Projects
Unverified Commit d6da30a5 authored by ArthurSonzogni's avatar ArthurSonzogni
Browse files

Add COOP/COEP for worker.js file.

parent d5b18992
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment