I am trying to use Microsoft.AspNetCore.Routing with multiple widdlewares which can match. For example:
builder.MapRoute("api", async c => {}) // Match all api calls
builder.MapRoute("api/user", async c => {}) // Only api/user
builder.MapRoute("api/client", async c => {}) // Only api/client
But currently the only one of them can match.
If I will make MapRoute("api/{*postfix}", handler), then only this handler will run and api/client and api/user wouldn't.
Is there a way to handle multiple matches?