Next.js Discord

Discord Forum

is `config.matcher` an OR or an AND?

American black bear posted this in #help-forum
Open in Discord
American black bearOP
so looking at this middleware given in the clerk auth:
export const config = {
  matcher: ["/((?!.+\\.[\\w]+$|_next).*)", "/(api|trpc)(.*)"],
so this matches all routes that start with /api or /trpc AND the first regex, or is it an OR? is there a way to customize the behavior here?

0 Replies