Skip to content

Commit f95f028

Browse files
committed
fix: move NextResponse.next to after try-catch
1 parent 9e6595e commit f95f028

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

middleware.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ export async function middleware(request: NextRequest) {
6969
return NextResponse.redirect(loginUrl);
7070
}
7171
}
72-
73-
return NextResponse.next();
7472
} catch (error) {
7573
console.error("Middleware authentication error:", error);
7674

@@ -88,6 +86,8 @@ export async function middleware(request: NextRequest) {
8886
return NextResponse.redirect(loginUrl);
8987
}
9088
}
89+
90+
return NextResponse.next();
9191
}
9292

9393
// Configure which routes the middleware should run on

0 commit comments

Comments
 (0)