From 27654afadb5088dda4eafd83f07410c2a48fa4b0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 1 Feb 2018 11:55:44 +0100 Subject: 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 Signed-off-by: Lukas Fleischer --- conf/config.proto | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'conf/config.proto') 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 -- cgit v1.2.3-24-g4f1b