Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading