Initial commit

This commit is contained in:
michaeltieso
2025-12-01 14:49:17 +00:00
commit 3480888eaa
92 changed files with 16631 additions and 0 deletions

35
middleware.ts Normal file
View File

@@ -0,0 +1,35 @@
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).*)',
],
};