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'; } }