9 months ago
I would like to have a service on domain.com and domain.com/api, but I am unsure if this is possible
8 Replies
9 months ago
It is! with a reverse proxy setup!
9 months ago
there's a caddy example:
https://github.com/railwayapp-templates/caddy-reverse-proxy
I am not sure how to deploy this? Do I have to fork the repo? I can't find it in templates either
I ended up forking it. Is there a reason Railway doesn't provide a path option when setting the domain on a service?
9 months ago
Did it work? I've been told that url paths are an application level construct, it would not be feasible for railway to offer such a feature as it could not cover everyone's applications nuances
Yeah it works very well! I imagine railway would run the reverse proxy for me in the background, but I don't know if that's the best way.
I do know that, for example, cloudflare tunnels allow you to set a path as well.