all repos — flynet @ 374c61832395384c6af711076066b338457d994f

ersatz CDN on fly.io

set rate limits for searchix deployments

Alin
commit

374c61832395384c6af711076066b338457d994f

parent

6b3fcb7f2e9864b7ae8312cc5a9e462f5e310537

2 files changed, 26 insertions(+), 1 deletion(-)

changed files
M CaddyfileCaddyfile
@@ -62,6 +62,28 @@ cache
header -Server } +(rate_limit) { + rate_limit { + distributed + zone global_static { + match { + query query=* + } + key static + events 100 + window 1m + } + zone host_dynamic { + match { + query query=* + } + key {remote_host} + events 5 + window 10s + } + } +} + flynet-butterfly-1123.fly.dev { respond "Hello, world!" }
@@ -92,6 +114,7 @@ }
searchix.ovh { import cache + import rate_limit goatcounter { api_host https://stats.searchix.ovh
@@ -125,6 +148,7 @@ }
stable.searchix.ovh { import cache + import rate_limit goatcounter { api_host https://stats.stable.searchix.ovh
M DockerfileDockerfile
@@ -7,7 +7,8 @@ --with github.com/caddyserver/cache-handler \
--with github.com/darkweak/storages/otter/caddy \ --with github.com/pberkel/caddy-storage-redis \ --with github.com/caddy-dns/rfc2136 \ - --with github.com/jarv/caddy-goatcounter + --with github.com/jarv/caddy-goatcounter \ + --with github.com/mholt/caddy-ratelimit FROM caddy:${CADDY_VERSION}-alpine AS runner