diff --git a/src/nginxconfig/generators/conf/wordpress.conf.js b/src/nginxconfig/generators/conf/wordpress.conf.js index 1c8e2b0..660f1fe 100644 --- a/src/nginxconfig/generators/conf/wordpress.conf.js +++ b/src/nginxconfig/generators/conf/wordpress.conf.js @@ -54,10 +54,17 @@ export default (global, domain) => { }; config['# WordPress: deny general stuff'] = ''; - config['location ~* ^/(?:xmlrpc\\.php|wp-links-opml\\.php|wp-config\\.php|wp-config-sample\\.php|readme\\.html|license\\.txt)$'] = { + config['location ~* ^/(?:wp-links-opml\\.php|wp-config\\.php|wp-config-sample\\.php|readme\\.html|license\\.txt)$'] = { deny: 'all', }; + if(global.security.wpDisableXmlrpc.computed){ + config["# Wordpress: deny xmlrpc, required for mobile and desktop apps"] = '' + config['location ~* ^/(?:xmlrpc\\.php)$'] = { + deny:'all' + } + } + if (global.security.limitReq.computed) { config['# WordPress: throttle wp-login.php'] = ''; config['location = /wp-login.php'] = { diff --git a/src/nginxconfig/templates/global_sections/security.vue b/src/nginxconfig/templates/global_sections/security.vue index 694b222..3fda78b 100644 --- a/src/nginxconfig/templates/global_sections/security.vue +++ b/src/nginxconfig/templates/global_sections/security.vue @@ -121,6 +121,23 @@ THE SOFTWARE. +