-
I am looking to see if Ocelot will fill a criteria for me. I have an infrastructure with a Gateway API that talks to several other identical APIs that are located in different sites. I need to route to the correct API based on the current users session. i.e., a request from User A needs to be routed to the API of Company A, and a request from User B needs to be routed to the API of Company B. The API end points that the Gateway needs to route to would be stored in a connected database. My question is; Am I able to use Ocelot to catch an incoming request, look up the API endpoint from my database in C#, and route that request to that end point? I can't store all my endpoints in the json file as they'd need to be changeable without manually editing files. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, maybe with delegating handlers? I'm using an handler to modify some parameters in the downstream route, according to user's reference. Yes, you can modify the request URI in the SendAsync method in DelegatingHandler |
Beta Was this translation helpful? Give feedback.
Hello, maybe with delegating handlers?
I'm using an handler to modify some parameters in the downstream route, according to user's reference.
Yes, you can modify the request URI in the SendAsync method in DelegatingHandler