Skip to content

Commit

Permalink
update matcher to latest recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcarpenter committed Jul 23, 2024
1 parent 6a9c1b3 commit 53ff4ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@ import { clerkMiddleware } from "@clerk/nextjs/server";
export default clerkMiddleware();

export const config = {
matcher: ['/((?!.*\\..*|_next).*)', '/', '/(api|trpc)(.*)'],
matcher: [
// Skip Next.js internals and all static files, unless found in search params
"/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)",
// Always run for API routes
"/(api|trpc)(.*)",
],
};

0 comments on commit 53ff4ce

Please sign in to comment.