abersheeran / asgi-ratelimit

A ASGI Middleware to rate limit
Apache License 2.0
292 stars 11 forks source link

init ratelimiter backend from config, not code #52

Closed ponytailer closed 2 years ago

ponytailer commented 2 years ago

For example:

RateLimiter(
    backend="simple/ratelimiter.backend.simple",
    ...
)

Because, different env config has the same code.

In CI/CD, use the simple, but use the redis in production.