How do you redirect from api route?
Unanswered
Cane di Oropa posted this in #help-forum
Cane di OropaOP
seems like mine is not working, we have
redirect and NextResponse.redirect i tried both but not working.. in app router2 Replies
redirect() should work, can you share some code?NextResponse.redirect() is for middlewareredirect has a pretty commonly overlooked side effect in that it throws an error for Next.js to catch and redirect, so if you are wrapping it in a try/catch block it won't ever redirect