mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(rpc): enforce ratelimiting
New configuration options: - `[ratelimit] cache` - A boolean indicating whether we should use configured cache (1) or database (0) for ratelimiting. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
6662975005
commit
65240c8343
5 changed files with 280 additions and 2 deletions
|
@ -48,6 +48,11 @@ redis_address = redis://localhost
|
|||
[ratelimit]
|
||||
request_limit = 4000
|
||||
window_length = 86400
|
||||
; Force-utilize cache for ratelimiting. In FastAPI, forced cache (1)
|
||||
; will cause the ratelimit path to use a real or fake Redis instance
|
||||
; depending on the configured options.cache setting. Otherwise,
|
||||
; cache will be ignored and the database will be used.
|
||||
cache = 1
|
||||
|
||||
[notifications]
|
||||
notify-cmd = /usr/bin/aurweb-notify
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue