Add support for registering an endpoint filter using an endpoint filter factory
ergonzalez-boh opened this issue · comments
ergonzalez-boh commented
Currently, Carter provides the ability to register endpoint filters through the CarterModule Before and After delegates. However, there is no built-in mechanism to incorporate an EndpointFilterFactory that would allow dynamic determination of whether an endpoint filter should be added to a specific endpoint during startup.
leandrods commented
Hello @ergonzalez-boh
RouteGroupBuilder root = app.MapGroup("/api");
root.MapCarter();
root.AddEndpointFilterFactory(ValidationFilter.ValidationFilterFactory);
Can't you solve it with that?