a year ago
I need to use my Nextjs App on a custom domain, which works using CNAME as mentioned in the guide.
But when I open the app on the custom domain (say.. mydomain.com), there are requests going from that to the primary domain - mydomain-production.up.railway.app
Also, all libraries and services, (eg. Sentry, Google OAuth) think that the up.railway.app domain is domain that I'm using, even when I visit the site using the custom domain
10 Replies
The issue here seems to be that the Nextjs server's address is the up.railway.app one.
So everytime the server has to call another service, the request originates from there and not from the custom domain.
This should not be the case. If my user accesses the app through the custom domain, then server should not refer the up.railway domain.
a year ago
have you redeployed the service since adding the domain?
a year ago
you still have AUTH_URL set to the service domain
a year ago
it should be set to "https://${{RAILWAY_PUBLIC_DOMAIN}}"
a year ago
please use reference variables, not using a reference variable is what caused this issue
This worked. I've been trying to figure this out for hours. Thanks a lot @Brody. Really appreciate it.
a year ago
no problem!
a year ago
!s
Status changed to Solved brody • over 1 year ago