diff --git a/middleware.ts b/middleware.ts deleted file mode 100644 index 5696183..0000000 --- a/middleware.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { NextResponse } from 'next/server'; -import type { NextRequest } from 'next/server'; - -export async function middleware(request: NextRequest) { - const { pathname } = request.nextUrl; - - // Skip middleware for admin routes, API routes, static files, and the lock page itself - if ( - pathname.startsWith('/admin') || - pathname.startsWith('/api') || - pathname.startsWith('/_next') || - pathname.startsWith('/icon.svg') || - pathname === '/lock' - ) { - return NextResponse.next(); - } - - // The actual password lock check will be done on the client side - // This middleware is kept simple and only used for future extensions - return NextResponse.next(); -} - -// Configure which routes use this middleware -export const config = { - matcher: [ - /* - * Match all request paths except for the ones starting with: - * - api (API routes) - * - _next/static (static files) - * - _next/image (image optimization files) - * - favicon.ico (favicon file) - */ - '/((?!api|_next/static|_next/image|favicon.ico).*)', - ], -};