File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 3737## X. RSS Feeds
3838## X. PHP-FPM Routing
3939## X. WP-Login (Rate Limiting)
40+ ## X. Admin-Ajax (Rate Limiting)
4041
4142## M. Adminer Settings
4243## N. Redirect Staging/Dev Subdirectories
@@ -494,6 +495,28 @@ location = /wp-login.php {
494495 fastcgi_no_cache $skip_cache;
495496}
496497
498+ ####################################################################################################
499+ #### X. Server Block (Production): Rate Limit admin-ajax.php #######################################
500+ ####################################################################################################
501+
502+ location = /wp-admin/admin-ajax.php {
503+
504+ ## protect against admin-ajax abuse ##
505+ limit_req zone=admin_ajax_second burst=10 nodelay;
506+ limit_req zone=admin_ajax_minute burst=30 nodelay;
507+
508+ ## fastcgi configurations ##
509+ include /etc/nginx/fastcgi.conf;
510+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
511+ fastcgi_pass 127.0.0.1:9000;
512+ fastcgi_read_timeout 300;
513+ fastcgi_index index.php;
514+
515+ ## bypass caching ##
516+ fastcgi_cache_bypass $skip_cache;
517+ fastcgi_no_cache $skip_cache;
518+ }
519+
497520####################################################################################################
498521#### I. Server Block (Production): Adminer Script ##################################################
499522####################################################################################################
You can’t perform that action at this time.
0 commit comments