Skip to content

Commit

Permalink
refactor(settings): use authRoutes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsun969 committed Feb 25, 2024
1 parent e0ed6a3 commit b8afd2b
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import { authMiddleware } from '@clerk/nextjs';

const authRoutes = ['/settings', '/admin'];

export default authMiddleware({
publicRoutes: [
'/',
'/about',
'/contact',
'/events',
'/sponsors',
'/signin',
'/join',
'/forgot-password',
],
publicRoutes: (req) => !authRoutes.includes(req.url),
});

export const config = {
Expand Down

0 comments on commit b8afd2b

Please sign in to comment.