File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1+ legacy-peer-deps = true
2+
Original file line number Diff line number Diff line change 1- import { authMiddleware } from '@clerk/nextjs'
1+ import { clerkMiddleware , createRouteMatcher } from '@clerk/nextjs/server '
22
3- export default authMiddleware ( {
4- //* Make all routes public by default
5- publicRoutes : [ '/((?!community/contributors).*)' ] ,
6- //* Only protect the contributors page
7- ignoredRoutes : [ '/((?!community/contributors).*)' ]
3+ const isPublicRoute = createRouteMatcher ( [ '/((?!community/contributors).*)' ] )
4+
5+ export default clerkMiddleware ( async ( auth , req ) => {
6+ if ( ! isPublicRoute ( req ) ) {
7+ await auth . protect ( )
8+ }
89} )
910
1011export const config = {
Original file line number Diff line number Diff line change 1414 },
1515 "dependencies" : {
1616 "@ant-design/icons" : " ^6.0.0" ,
17- "@clerk/nextjs" : " ^4.31.5 " ,
17+ "@clerk/nextjs" : " ^6.35.0 " ,
1818 "@clerk/themes" : " ^2.2.3" ,
1919 "@heroicons/react" : " ^2.0.18" ,
2020 "framer-motion" : " ^12.0.0" ,
You can’t perform that action at this time.
0 commit comments