-
If I have a microservice with many Controllers route1, route2, .... I have to do something like this:
The above code is working as it should be. Meanwhile, I wish I could simplify it like the following:
What I understood is that 'WithTransformPathRemovePrefix("/s1");' will remove the "/s1" from the path and transforms the route to the catch all as the following: /s1/route1/getsomething => /route1/getsomething Unfortunately, it returns 404 not found! Any idea how to catch everything for some prefix and route them to a specific cluster. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Try this:
|
Beta Was this translation helpful? Give feedback.
Try this:
r = r.WithTransformPathRemovePrefix("/s1");
r
is immutable so theWith*
extensions return a modified copy. This mirrors the new C#9 keywordwith
.