14 lines
486 B
TypeScript
14 lines
486 B
TypeScript
import { NextResponse } from 'next/server';
|
|
import type { NextRequest } from 'next/server';
|
|
|
|
// Middleware runs on edge runtime - we can't verify JWT here easily
|
|
// Let the pages handle auth checks via /api/auth/me
|
|
export function middleware(request: NextRequest) {
|
|
// No redirects - login and admin pages handle their own auth UI
|
|
return NextResponse.next();
|
|
}
|
|
|
|
// Configure which paths the middleware should run on
|
|
export const config = {
|
|
matcher: ['/admin/:path*', '/login'],
|
|
}; |