don't cache instances.json

This commit is contained in:
MathMan05 2024-10-30 15:39:04 -05:00
parent 02d58bc64e
commit 4c8ac492c0
2 changed files with 20 additions and 19 deletions

View file

@ -77,8 +77,7 @@ login?: string;
div.append(statbox);
div.onclick = _=>{
if(instance.online){
window.location.href =
"/register.html?instance=" + encodeURI(instance.name);
window.location.href = "/register.html?instance=" + encodeURI(instance.name);
}else{
alert("Instance is offline, can't connect");
}

View file

@ -93,7 +93,9 @@ async function getfile(event: FetchEvent):Promise<Response>{
}
let path=toPath(event.request.url);
if(path === "/instances.json"){
return await fetch(path);
}
console.log("Getting path: "+path);
const responseFromCache = await caches.match(path);
if(responseFromCache){