+ it dev nextjs redirect stackoverflow.comHow to prevent infinite loop when redirecting using middleware in Next.js I have a middleware in Next.js: export async function middleware(request: NextRequest) { const isUserLoggedIn = ... if (isUserLoggedIn) { return NextResponse.redirect(new URL('/user', requ... wono 1 month ago | tweet Add comment Do you want to delete? YesNo