Skip to main content

Module ratelimit

Module ratelimit 

Source
Expand description

Token buckets, keyed so one noisy client cannot spend another’s budget.

A valid API key gets its own bucket per client address. An invalid or missing key buckets on the address alone: the header is attacker-controlled before auth runs, so if any header value bought its own bucket, rotating a bogus key per request would mint a fresh bucket each time and leave unauthenticated floods unmetered.

Structs§

Limiter