middleware/rate_limit library

Classes

RateLimit
Lets a client send at most max requests in each per window. One more request gets 429 Too Many Requests with a Retry-After header (seconds). Every answer has X-RateLimit-Limit and X-RateLimit-Remaining.

Typedefs

RateLimitKey = String Function(DoxRequest req)
Gives the name of the client to count requests for, eg. its ip.