From 04dcfd93bdc8325413d64f7b961837cb20ee8a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20=C3=87ALI=C5=9EIR?= Date: Sat, 6 Jun 2026 07:01:08 +0300 Subject: [PATCH] implement rate limiting --- nginx/default.conf | 5 +++++ 1 file changed, 5 insertions(+) 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;