Skip to content

Commit

Permalink
✨ chore: add skip path check for routes starting with /api/auth
Browse files Browse the repository at this point in the history
  • Loading branch information
ad956 committed Sep 20, 2024
1 parent 4255ccc commit 77f3edc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middlewares/handleApiRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default async function handleApiRoute(request: NextRequest) {
const path = request.nextUrl.pathname;

// skipping middleware
if (SKIP_PATHS.includes(path)) {
if (SKIP_PATHS.some((skipPath) => path.startsWith(skipPath))) {
return NextResponse.next();
}

Expand Down

0 comments on commit 77f3edc

Please sign in to comment.