new notification system

This commit is contained in:
KingKDot
2026-03-22 00:36:02 -05:00
parent b98613ae51
commit 92530044c9
15 changed files with 580 additions and 5 deletions
@@ -45,7 +45,11 @@ export async function handleAssetsRoutes(
const file = Bun.file(resolvedPath);
if (await file.exists()) {
return new Response(file, { headers: deps.secureHeaders(deps.mimeType(url.pathname)) });
const headers: Record<string, string> = { ...deps.secureHeaders(deps.mimeType(url.pathname)) };
if (relativePath === "notification-sw.js") {
headers["Service-Worker-Allowed"] = "/";
}
return new Response(file, { headers });
}
return new Response("Not found", { status: 404 });
}