Reputation: 8772
How can be written middleware that is executed on specific routes using MVC 6? This can be done in the precious version of the WebAPI using a DelegatingHandler, I can't find a way of doing it in MVC 6 though.
Upvotes: 1
Views: 542
Reputation: 36736
something like this should do it I think
PathString path = new PathString("/somefolder");
app.Map(path,
appBranch =>
{
// add middleware needed for this branch
});
Upvotes: 2