Path routing with root and everything below #1558
-
Hello! I have a configuration that works but would like to get some feedback how to simplify it. Basically i want to route everything from /templates and /templates/{**everything} to a single cluster. Is that possible with a single rule? Currently I have this:
Problem is the / at the end so the /{**catchall} doesn't trigger for a path without / at the end. Am I missing something obvious? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Are you using ASP.NET Core 3.1? There was a bug with catch-all routing. See: You don't need that transform on the first route, the existing path is passed through by default. The transform you have on the second route would prevent you from being able to combine these even if the catch-all worked. |
Beta Was this translation helpful? Give feedback.
Are you using ASP.NET Core 3.1? There was a bug with catch-all routing. See:
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-3.1#route-template-reference
You don't need that transform on the first route, the existing path is passed through by default.
The transform you have on the second route would prevent you from being able to combine these even if the catch-all worked.