Ruolo campus: accesso limitato a /campus, landing dedicata

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-25 15:26:35 +02:00
parent 20f7cf4003
commit a7d918d241
4 changed files with 60 additions and 4 deletions
+2 -1
View File
@@ -6,7 +6,8 @@ export const onRequest = defineMiddleware((context, next) => {
const { pathname } = context.url;
const isProtected =
(pathname.startsWith('/admin') && pathname !== '/admin/login') ||
pathname.startsWith('/api/admin');
pathname.startsWith('/api/admin') ||
pathname.startsWith('/campus');
if (!isProtected) return next();
const token = context.cookies.get(SESSION_COOKIE)?.value;