# Replace with your actual domain.
# Caddy will automatically provision and renew a Let's Encrypt certificate.
#
# Rate limiting: each IP is allowed 120 requests per minute before receiving
# 429 Too Many Requests. Tune events/window to match your sync traffic.
{
    order rate_limit before reverse_proxy
}

sync.example.com {
    rate_limit {
        zone per_ip {
            key {remote_host}
            events 120
            window 1m
        }
    }

    reverse_proxy sync:8080
}
