fix(*): Fix adsense duplication

This commit is contained in:
Josh Creek
2026-01-25 19:58:38 +00:00
parent ed31649224
commit 7abd7090f7
2 changed files with 34 additions and 23 deletions
+7
View File
@@ -8,5 +8,12 @@ self.addEventListener('activate', (event) => {
});
self.addEventListener('fetch', function (event) {
if (event.request.method !== 'GET') {
return;
}
const url = new URL(event.request.url);
if (url.origin !== self.location.origin) {
return;
}
event.respondWith(fetch(event.request));
});