Skip to content
Unverified Commit 66835476 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Add support for ratelimiting via annotations



This allows adding rate limiting via annotations to controllers, as one example:

```
@UserRateThrottle(limit=5, period=100)
@AnonRateThrottle(limit=1, period=100)
```

Would mean that logged-in users can access the page 5 times within 100 seconds, and anonymous users 1 time within 100 seconds. If only an AnonRateThrottle is specified that one will also be applied to logged-in users.

Signed-off-by: default avatarLukas Reschke <lukas@statuscode.ch>
parent 5505faa3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment