darian
Explore posts from serversNextjs redirect to localhost instead of domain
I've deployed several Next.js applications on Railway, but I recently encountered this odd behavior with
Response.redirect
. Strangely, it redirects to localhost instead of the configured domain. I'm wondering if this issue is related to the latest Next.js update or perhaps with the Railway Edge Proxy.
I created a clean new Next.js app for testing, and the problem persists. However, when I deployed it to other platform like Vercel, the issue disappeared.
Link to original issue with reproduction:
https://help.railway.app/questions/next-js-route-handler-is-returning-local-683ba64f#p-56 replies