-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
ASP.NET Core performance middleware doesn't handle Attribute routing #761
Comments
cc @Tyrrrz |
Afaik
I'm guessing the logic short-circuits when it finds the route name on the endpoint feature and doesn't get to the routing feature. I wonder if switching them around would fix the issue. |
Update on this one, this seems to only happen when a route 404s. Also, GetRouteData() actually does more: |
With the current middleware implementation, attribute routing (eg
[Route("/route/{param}")]
) is still handled as paths. There are 2 possible ways to work around this:httpContext.GetRouteData()
(probably .NET Core 3 and newer), which extractshttpContext.Request.RouteValues
if it's available.which will allow any logic that modifies routing to be applied before the transaction is sent.
The text was updated successfully, but these errors were encountered: