fix: ensure next response for signed-out users
This commit is contained in:
parent
85f9414fa7
commit
647932b76f
1 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,8 @@ export async function middleware(request: NextRequest) {
|
|||
|
||||
if (sessionToken) {
|
||||
return NextResponse.redirect(new URL('/dashboard', request.url));
|
||||
} else {
|
||||
return NextResponse.next();
|
||||
}
|
||||
} else if (!isProtectedRoute) {
|
||||
return NextResponse.next();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue