How can i ignore the paths by folder currently it's so tiring to specify each path manually
https://nextjs.org/docs/app/getting-started/project-structure#route-groups-and-private-folders
- (public)
- - worksp/auth_whook
- - demo
// In middleware auth mode, each page is protected by default.
// Exceptions are configured via the `unauthenticatedPaths` option.
export default authkitMiddleware({
middlewareAuth: {
enabled: true,
unauthenticatedPaths: ["/", "/aws", "/api/trpc/:path*", "/demo"],
},
})
export const config = {
matcher: [
"/(api|trpc)(.*)",
"/",
"/demo",
"/aws",
"/dash/:page*",
"/api/d/:page*",
],
}