fully host /kiri from /boot

This commit is contained in:
Stewart Allen 2025-10-14 02:07:49 -04:00
commit e183be3bd7

View file

@ -94,6 +94,14 @@ async function fetch_safe(req) {
// --- fetch handler ---
self.addEventListener('fetch', e => {
const { request } = e;
if (request.url.endsWith("/kiri") || request.url.endsWith("/kiri/")) {
e.respondWith((async () => {
return Response.redirect("/kiri/index.html", 302);
})());
return;
}
const url = new URL(request.url);
if (request.method !== 'GET') return;