-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Idea] Allow routing based on partial or complete route params #1609
Comments
For path based routing we're limited to what's available in ASP.NET Core Routing. What you can do is use the route parameters to capture the tenant ID and then use this new 1.1 feature to check the tenant in middleware and dispatch to the desired cluster: #1538 |
@Tratcher Thanks a lot for your feedback.
As I was having a little bit of spare time today, I've started to work on it (cf #1610). I I've got a little something that seems to achieve what I was after. Would you be so kind to glance at it and see if that's something that would deserve a review? |
Triage:
|
Hello, Fwiw, I would also be interested to see path param prefix based routing by Yarp. |
Having a similar issue, I searched on Internet if it is a common one and it appears that several project implements this kind of logic (see hapi or find-my-way) (as this routing behavior is developped on several application I suppose that's a pretty common request from the users) and I would be highly interested that the same approach be taken for the Microsoft reverse proxy. |
Yarp is a great but I would be excited to see that feature implemented in Yarp. |
What should we add or change to make your life better?
Hello,
It's currently possible to perform routing based on headers and query parameters.
How open would you be to extend
RouteMatch
to have it expose aRouteParam
sub matcher. This one would be very similar toRouteQueryParameter
(accepting values, a mode, ...).Given, for instance, a route such as
/api/tenants/{tenant_id}/do/something
, it would be easy to redirect the requests based on the value oftenant_id
.Why is this important to you?
In order to meet regulations, data from those tenants should be stored in selected geographical locations.
Would this feature request feel appropriate, I'd be very willing to help contribute it through a Pull Request.
The text was updated successfully, but these errors were encountered: