From 7239ca6d5a50c58d5dadc1995f7154a578e237ee Mon Sep 17 00:00:00 2001 From: Falkan Date: Fri, 20 Mar 2026 01:56:15 -0400 Subject: [PATCH] debug: log reroute calls in hooks.ts --- src/hooks.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hooks.ts b/src/hooks.ts index fcec439..ae14c8a 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -24,12 +24,14 @@ export const reroute: Reroute = ({ url }) => { // Public path → internal /admin if (url.pathname === prefix || url.pathname.startsWith(prefix + '/')) { + console.log(`[reroute] ${url.pathname} → /admin${url.pathname.slice(prefix.length)}`); return '/admin' + url.pathname.slice(prefix.length); } // Block direct /admin access when a custom path is configured if (adminPath !== 'admin') { if (url.pathname === '/admin' || url.pathname.startsWith('/admin/')) { + console.log(`[reroute] blocking direct /admin access → /404`); return '/404'; } }