ratelimit pubsub

This commit is contained in:
Arya 2024-05-28 20:30:10 +05:30
parent f4d089e697
commit 1705998e11
Signed by: arya
GPG Key ID: 842D12BDA50DF120
2 changed files with 4 additions and 0 deletions

View File

@ -153,6 +153,8 @@ inv.{{ server_prefix }}.projectsegfau.lt i.{{ server_prefix }}.psf.lt {
@ratelimit not path /videoplayback/* /ggpht/* /vi/* /videoplayback /videojs/* /css/* /js/* /fonts/* /apple-touch-icon.png /favicon-16x16.png /feed/webhook /feed/webhook/* @ratelimit not path /videoplayback/* /ggpht/* /vi/* /videoplayback /videojs/* /css/* /js/* /fonts/* /apple-touch-icon.png /favicon-16x16.png /feed/webhook /feed/webhook/*
rate_limit @ratelimit {remote.ip} 10r/s rate_limit @ratelimit {remote.ip} 10r/s
rate_limit @ratelimit {remote.ip} 100r/m rate_limit @ratelimit {remote.ip} 100r/m
@ratelimit_pubsub path /feed/webhook /feed/webhook/*
rate_limit @ratelimit_pubsub {remote.ip} 2r/s 404
log { 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. # 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/ratelimiters.log output file /var/log/caddy/ratelimiters.log

View File

@ -29,6 +29,8 @@ inv.bp.projectsegfau.lt, i.bp.psf.lt, invidious.projectsegfau.lt, inv.projectseg
@ratelimit not path /videoplayback/* /ggpht/* /vi/* /videoplayback /videojs/* /css/* /js/* /fonts/* /apple-touch-icon.png /favicon-16x16.png /feed/webhook /feed/webhook/* @ratelimit not path /videoplayback/* /ggpht/* /vi/* /videoplayback /videojs/* /css/* /js/* /fonts/* /apple-touch-icon.png /favicon-16x16.png /feed/webhook /feed/webhook/*
rate_limit @ratelimit {remote.ip} 10r/s rate_limit @ratelimit {remote.ip} 10r/s
rate_limit @ratelimit {remote.ip} 100r/m rate_limit @ratelimit {remote.ip} 100r/m
@ratelimit_pubsub path /feed/webhook /feed/webhook/*
rate_limit @ratelimit_pubsub {remote.ip} 2r/s 404
log { 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. # 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/ratelimiters.log output file /var/log/caddy/ratelimiters.log