summaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-02-01 11:55:44 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2018-02-24 14:57:31 +0100
commit27654afadb5088dda4eafd83f07410c2a48fa4b0 (patch)
tree504d5fdb20e8f6be6a757f70054edc1db737b839 /conf
parentf51d4c32cd8bed69d2f6b0c50424280613c68496 (diff)
downloadaur-27654afadb5088dda4eafd83f07410c2a48fa4b0.tar.gz
aur-27654afadb5088dda4eafd83f07410c2a48fa4b0.tar.xz
Add rate limit support to API
This allows us to prevent users from hammering the API every few seconds to check if any of their packages were updated. Real world users check as often as every 5 or 10 seconds. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'conf')
-rw-r--r--conf/config.proto4
1 files changed, 4 insertions, 0 deletions
diff --git a/conf/config.proto b/conf/config.proto
index 17509299..934d3697 100644
--- a/conf/config.proto
+++ b/conf/config.proto
@@ -36,6 +36,10 @@ enable-maintenance = 1
maintenance-exceptions = 127.0.0.1
render-comment-cmd = /usr/local/bin/aurweb-rendercomment
+[ratelimit]
+request_limit = 4000
+window_length = 86400
+
[notifications]
notify-cmd = /usr/local/bin/aurweb-notify
sendmail = /usr/bin/sendmail