Redirect not working as expected in prod
Answered
Anay-208 posted this in #help-forum
Anay-208OP
In production, it is redirecting users to a different origin.
code:
its redirecting to localhost/?incorrect
code:
return NextResponse.redirect(new URL('/?incorrect', request.url), 303)its redirecting to localhost/?incorrect
Answered by Anay-208
I had to edit the package.json as follows:
where 0.0.0.0 is my vps ip
"start": "next start -p 80 --hostname 0.0.0.0"where 0.0.0.0 is my vps ip
1 Reply
Anay-208OP
I had to edit the package.json as follows:
where 0.0.0.0 is my vps ip
"start": "next start -p 80 --hostname 0.0.0.0"where 0.0.0.0 is my vps ip
Answer