diff --git a/nginx/default.conf b/nginx/default.conf index 257709e..2305017 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -121,6 +121,11 @@ server { fastcgi_index index.php; fastcgi_pass wordpress-fpm:9001; include /etc/nginx/fastcgi_params; + + limit_req zone=nppp_api burst=5 nodelay; # Apply rate limit; allow burst of 5 with no queuing delay + limit_req_status 429; # Return 429 Too Many Requests instead of default 503 + limit_req_log_level warn; # Log rate limit hits as warnings, not errors + fastcgi_cache_bypass $skip_cache; fastcgi_no_cache $skip_cache; fastcgi_cache NPP;