Skip to content

Commit

Permalink
Merge pull request #10 from clerk/ac.update-matcher
Browse files Browse the repository at this point in the history
alexcarpenter authored Jul 23, 2024
2 parents 6a9c1b3 + 53ff4ce commit a348150
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
@@ -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 a348150

Please sign in to comment.