diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 0f301d6..05ff474 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -178,13 +178,13 @@ http { XMLHttpRequest 1; } - ######## NPP API RATE LIMIT ######## + ######## NPP REST API RATE LIMIT ######## # Limits requests to the NPP cache API endpoint. # Only active for matching URIs; all other requests use an empty key # which disables rate limiting entirely for non-NPP traffic. map $request_uri $nppp_limit_key { - ~^/wp-json/nppp_nginx_cache/ $binary_remote_addr; + ~^/wp-json/nppp_nginx_cache/v2/(purge|preload)(\?.*)?$ $binary_remote_addr; default ""; } limit_req_zone $nppp_limit_key zone=nppp_api:10m rate=10r/m;