I have a Web API which has two endpoints:
- /tenant1/xxx
- /tenant2/xxx
The Web API serves multiple tenants and it is hosted as a single instance. Now I have to public this Web API to the outside for using, from the third party, they don't need to know which tenant they should call, instead, they call /api/dosomething (another web API), and inside that API, I will look at the parameter and decide which tenant I should reroute. I use Ocelot as API Gateway but searching on the document I can not find the condition routing. Can anyone help me with this?
Ocelot supports DelegatingHandler which play as middleware for out-going request