Prodigy behind reverse proxy

I followed the steps here Using Prodigy with a ProxyPass and managed to get prodigy working behind an Nginx reverse proxy - prodvided that I proxy /get_questions etc. to the root /get_questions. However, I have several prodigy instances running behind the same reverse proxy, so I really do need to proxy requests to specific instances, i.e. /get_questions from instance_one needs to go to /instance_one/get_questions. That way each instance of prodigy will be interacting with its own API. Is it possible to configure the prodigy root to be /instance_one and not /? I looked into the documentation for the hug and fastapi middleware but found no good way to easily configure them.

For example, consider my domain name example.com and a prodigy instance hosted at example.com/instance_one. Then a request from instance_one to /get_questions will go to example.com/get_questions and not example.com/instance_one/get_questions.

Unfortunately we don't support path-based routing. :cry: I wanted this too for our own deployments and really tried to get it to work, but as far as I can see there's no good way to do it that doesn't require recompiling the front-end once the desired subpath is known.

The solution is to use subdomain routing instead. So instead of /instance_one/get_questions you'll have instance_one.example.com/get_questions. See further discussion here: Feature request: URL prefixing

Thanks for the quick reply! Subdomain routing would work fine - but how do I tell prodigy that it is running on a subdomain, so requests are sent to instance_one.example.com/get_questions?

This should all happen automatically and Prodigy won't even have to know any of this. It runs at the root level, so whether you map it to example.com or instance_one.example.com makes no difference (it's only example.com/instance_one that wouldn't work, because the requests would then still go to example.com/...).