chore: remove unused middleware placeholder
The middleware only passed requests through without modification. Password lock protection is handled client-side via PasswordLockGuard.
This commit is contained in:
@@ -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).*)',
|
|
||||||
],
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user