Exclude dynamic routes in Clerk middleware
I am attempting to exclude all routes for my page /test/[id].tsx
This is what my Clerk middleware looks like:
Excluding a single page works fine, but when it comes to dynamic routes, it doesn't work. What am I doing wrong?
3 Replies
Solution
You should try
ignoredRoutes: ['/test/(.*)']
insteadClerk does not use the Next route format (they use regex instead)
This solved it. Thank you very much.