From 794c9845dc9c976e3fe62a8706ac68da87377a18 Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Tue, 5 Sep 2023 10:42:41 +0530 Subject: [PATCH] dont apply RL for static stuff --- privfrontends/templates/Caddyfile.j2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/privfrontends/templates/Caddyfile.j2 b/privfrontends/templates/Caddyfile.j2 index 73fd6e2..d5f7883 100644 --- a/privfrontends/templates/Caddyfile.j2 +++ b/privfrontends/templates/Caddyfile.j2 @@ -82,8 +82,12 @@ 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 - rate_limit {remote.ip} 2r/s 60000 500 - rate_limit {remote.ip} 30r/m 300000 500 + + @rlignore { + not path /css/* /js/* /fonts/* /browserconfig.xml /android-chrome* /favicon* /logo* /lp.svg /robots.txt /safari* /site.webmanifest + } + rate_limit @rlignore {remote.ip} 2r/s 60000 500 + rate_limit @rlignore {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