diff --git a/middleware.ts b/middleware.ts index 1ac3523..1810f36 100644 --- a/middleware.ts +++ b/middleware.ts @@ -43,12 +43,13 @@ export const config = { /* * Match all request paths except for the ones starting with: * - api (API routes) + * - admin (admin panel — static page, manages its own security) * - _next/static (static files) * - _next/image (image optimization files) * - favicon.ico, sitemap.xml, robots.txt (metadata files) */ { - source: '/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)', + source: '/((?!api|admin|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)', missing: [ { type: 'header', key: 'next-router-prefetch' }, { type: 'header', key: 'purpose', value: 'prefetch' },