Skip to content

Service to recalculate endpoint to execute with endpoint routing #30549

Closed
@brockallen

Description

@brockallen

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 templatesfeature-routing

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions