next-enterprise/middleware.ts

22 lines
591 B
TypeScript
Raw Normal View History

2023-11-25 23:30:41 +01:00
import { NextResponse } from "next/server"
import type { NextRequest } from "next/server"
2024-01-24 03:04:18 +08:00
import NextAuth from "next-auth"
import { authConfig } from "./auth.config"
2023-11-25 23:30:41 +01:00
2024-01-24 03:04:18 +08:00
export default NextAuth(authConfig).auth
export function middleware(request: NextRequest) {}
2023-11-25 23:30:41 +01:00
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).*)",
],
}