From 130efe41f074a7745c1cf3dce2c023873168c63d Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Sun, 3 Sep 2023 23:06:05 +0530 Subject: [PATCH] fix ratelmiits --- privfrontends/templates/Caddyfile.j2 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/privfrontends/templates/Caddyfile.j2 b/privfrontends/templates/Caddyfile.j2 index 5153154..73fd6e2 100644 --- a/privfrontends/templates/Caddyfile.j2 +++ b/privfrontends/templates/Caddyfile.j2 @@ -2,6 +2,7 @@ log { output discard } + order rate_limit before basicauth } (tor) { @@ -81,10 +82,8 @@ lbry.{{ server_prefix }}.projectsegfau.lt lbry.projectsegfau.lt { nitter.{{ server_prefix }}.projectsegfau.lt nitter.projectsegfau.lt n.psf.lt n.{{ server_prefix }}.psf.lt { import def import banips - route / { - rate_limit {remote.ip} 2r/s 60000 500 - rate_limit {remote.ip} 30r/m 300000 500 - } + rate_limit {remote.ip} 2r/s 60000 500 + rate_limit {remote.ip} 30r/m 300000 500 log { # This is temporarily required to monitor nitter traffic due to scrapers being more active, so we need to monitor and rate limit them at a later date. output file /var/log/caddy/nitter.log