Closed
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.