So currently I have different platforms of the application split like this.
app.example.io app.subdomain1.io and app.subdomain2.io.
Setting up the initial routes to be only accessible on certain platforms was easy. But how can I link or redirect to a different subdomain without hardcoding the URL? I am running the application locally, in a staging env, and eventually in production and don't want to change it every time.
For example after login from app.example.io/login I might want to go to app.subdomain1.io/homepage
Has anyone worked with this before?
Of course, I know I could write some custom logic to split up the URL and get access to the subdomain that way but I am trying to see if there is a better way.