kolbma / rocket-governor

Implementation of Governor rate limiter for Rocket
19 stars 6 forks source link

Use RateLimitingMiddleware when released #2

Closed kolbma closed 2 years ago

kolbma commented 3 years ago

In master branch of governor there is a RateLimitingMiddleware feature which can be used to get information about current rate limiting state and quota.

This might be the possibility to set the HTTP headers on limits correctly. And circumvent the need to capsule governor Quota in the inner of another struct to collect settings.

https://github.com/antifuchs/governor/pull/67

kolbma commented 3 years ago

There is also this governor/issues/66 with some information.

antifuchs commented 2 years ago

It took a while, but now 0.4.0 is out, with the middleware change: https://crates.io/crates/governor/0.4.0

kolbma commented 2 years ago

@antifuchs Thanks for info. Need to finish some other stuff before I can continue with this.

kolbma commented 2 years ago

Releasing https://github.com/kolbma/rocket-governor/releases/tag/v0.1.0-rc.1 with using governor middleware.