mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-08 18:21:02 +08:00
Add rule for wordpress seo plugin (fixes #132)
This commit is contained in:
@@ -32,6 +32,9 @@ export default global => {
|
||||
deny: 'all',
|
||||
};
|
||||
|
||||
config['# WordPress: SEO plugin'] = '';
|
||||
config['location ~* ^/wp-content/plugins/wordpress-seo(?:-premium)?/css/main-sitemap\\.xsl$'] = {};
|
||||
|
||||
config['# WordPress: deny wp-content/plugins (except earlier rules)'] = '';
|
||||
config['location ~ ^/wp-content/plugins'] = {
|
||||
deny: 'all',
|
||||
|
@@ -107,7 +107,9 @@ export default entriesOrObject => {
|
||||
// Single linebreak between comment and block
|
||||
.replace(/^([^\S\r\n]*#.*)(?:\n[^\S\r\n]*)+\n([^\S\r\n]*.*{)/gm, '$1\n$2')
|
||||
// Double linebreak after double comment
|
||||
.replace(/^([^\S\r\n]*#.*\n[^\S\r\n]*#.*\n)([^\S\r\n]*[^#\s])/gm, '$1\n$2');
|
||||
.replace(/^([^\S\r\n]*#.*\n[^\S\r\n]*#.*\n)([^\S\r\n]*[^#\s])/gm, '$1\n$2')
|
||||
// No newline for empty blocks
|
||||
.replace(/^([^\S\r\n]*.*{)\n[^\S\r\n]*(})/gm, '$1$2');
|
||||
|
||||
// Cleanup extra linebreaks between multiple close blocks
|
||||
// Use a loop as this has overlapping matches
|
||||
|
Reference in New Issue
Block a user