-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-routing
Milestone
Description
Is there a way to cause endpoint routing to re-calculate the endpoint that is to be executed? Perhaps as a service in DI?
My Scenario:
I have a middleware that is often registered after UseRouting
. During request processing I have the need to re-write the request so it changes the request path (e.g. from /foo
to /bar
), but once the next middleware is executed which eventually ends up at UseEndpoints
we get a 404 due to the now mismatched path.
I'd love a service in DI to help with this that I can trigger from my middleware.
Metadata
Metadata
Assignees
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-routing