Skip to content

How to ignore route group folder instead of specifying the manual paths in Next.js #320

@khanakia

Description

@khanakia

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*",
  ],
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions