I set up a ratelimit in my nginx config. Usually you would define a location and define the rate limit zone. I want the zone to apply on ALL files on the web server.
limit_req_zone $binary_remote_addr zone=zone1:3m rate=5r/m;
limit_req_status 429;
server {
listen 80 http2;
listen 443 ssl http2;
server_name SERVERNAME;
root /var/www/cdn/public_html/;
#SSL Config
ssl_certificate PATH;
ssl_certificate_key PATH;
location / {
limit_req zone=zone1 nodelay;
}
}
I know that the location /
does not work. That's why I am asking how to apply it to all files.
Example what i mean by a file /files/foo.zip