Files
fintrack/middleware.ts

23 lines
505 B
TypeScript

import { withAuth } from "next-auth/middleware";
export default withAuth({
pages: {
signIn: "/login",
},
});
export const config = {
matcher: [
/*
* Match all request paths except for the ones starting with:
* - api/auth (authentication routes)
* - login (login page)
* - _next/static (static files)
* - _next/image (image optimization files)
* - favicon.ico (favicon file)
*/
"/((?!api/auth|login|_next/static|_next/image|favicon.ico).*)",
],
};