You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to implement a rate limiter that is capable of knowing the current user, and allows applying different policies each endpoint in controllers.
I think it should be put after mapping controllers and also after authorization & authorization middlewares. But don't want to put it at the end, if the request should be declined, there is no need to execute unrelated middlewares, the execution pipeline should stop immediately. Where is the possibly earliest place to put app.UseRateLimiter()?
I began to implement it, in the meantime you may suggest the middlewares order.
The text was updated successfully, but these errors were encountered:
In which order to put
app.UseRateLimiter()
?I want to implement a rate limiter that is capable of knowing the current user, and allows applying different policies each endpoint in controllers.
I think it should be put after mapping controllers and also after authorization & authorization middlewares. But don't want to put it at the end, if the request should be declined, there is no need to execute unrelated middlewares, the execution pipeline should stop immediately. Where is the possibly earliest place to put
app.UseRateLimiter()
?I began to implement it, in the meantime you may suggest the middlewares order.
The text was updated successfully, but these errors were encountered: