Fix: Remove url for debugging
This commit is contained in:
@@ -87,19 +87,15 @@ self.addEventListener('fetch', (event) => {
|
|||||||
async function checkCache(url){
|
async function checkCache(url){
|
||||||
const cache = await caches.open('risuCache')
|
const cache = await caches.open('risuCache')
|
||||||
|
|
||||||
const origURL = url.pathname;
|
|
||||||
|
|
||||||
if(url.pathname.startsWith("/sw/check")) {
|
if(url.pathname.startsWith("/sw/check")) {
|
||||||
url.pathname = "/sw/img" + url.pathname.slice(9);
|
url.pathname = "/sw/img" + url.pathname.slice(9);
|
||||||
return new Response(JSON.stringify({
|
return new Response(JSON.stringify({
|
||||||
"able": !!(await cache.match(url)),
|
"able": !!(await cache.match(url))
|
||||||
"origURL": origURL,
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Response(JSON.stringify({
|
return new Response(JSON.stringify({
|
||||||
"able": !!(await cache.match(url)),
|
"able": !!(await cache.match(url))
|
||||||
"origURL": origURL,
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user