Get associated RateLimiter for the current HttpContext instance
Hello! I'm currently using and
Microsoft.AspNetCore.RateLimiting
Microsoft.AspNetCore.RateLimiting
and my question is if is there any way to get the associated RateLimiter instance for the current HttpContext.
app.Use((httpContext, next) =>{ // Apparently, it is not possible to do this through dependency injection. var rateLimiter = httpContext.RequestServices.GetService<RateLimiter>(); }
app.Use((httpContext, next) =>{ // Apparently, it is not possible to do this through dependency injection. var rateLimiter = httpContext.RequestServices.GetService<RateLimiter>(); }