There's good plugin for Caddy which implements rate limiting for Nostr relay:
https://github.com/mholt/caddy-ratelimit
Then you can setup rate limiter in Caddyfile like this:
```{
order rate_limit before basicauth
}
your-relay-domain.com {
reverse_proxy 127.0.0.1:8080
tls your-email@example.com
rate_limit {
zone dynamic_zone {
key {http.request.remote_ip}
events 10
window 1s
}
}
# ...Other configs
}```
#nostr #relay #howtosetuprelay #caddy #ratelimiting
Login to reply