Next.js Discord

Discord Forum

Vercel API routes redirect

Unanswered
American Shorthair posted this in #help-forum
Open in Discord
American ShorthairOP
Does anyone know how can I redirect using api routes when i do some kind of validation. eg:
if(valid){
res.redirect("/somewhere")
}
res.redirect("/somewhere-else")

This is working locally but when I push the code to production it is not redirecting as it should

1 Reply