mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-04-20 03:50:20 +00:00
21 lines
588 B
TypeScript
21 lines
588 B
TypeScript
import { withAuth } from "next-auth/middleware";
|
|
|
|
export default withAuth(
|
|
// `withAuth` augments your `Request` with the user's token.
|
|
function middleware(req) {},
|
|
);
|
|
|
|
export const config = {
|
|
// https://nextjs.org/docs/app/building-your-application/routing/middleware#matcher
|
|
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|auth/|access-denied).*)",
|
|
],
|
|
};
|