summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarracuda Team2016-08-15 20:20:03 +0200
committerBarracuda Team2016-08-15 20:20:03 +0200
commit53a8db48925e0e78ba4eb84f9a678dcd54cde054 (patch)
tree208a4b66d78067a5c246da81cbb9a5f91eb1c857
parentfe37b7d6670842d9fe07dcaa58d8c2990768a0cc (diff)
Nginx: Fix for not working autodiscover flood protectionBOA-3.1.2
-rw-r--r--http/Provision/Config/Nginx/Inc/vhost_include.tpl.php12
-rw-r--r--http/Provision/Config/Nginx/subdir.tpl.php12
2 files changed, 16 insertions, 8 deletions
diff --git a/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php b/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php
index 43e38dc..d3ad2b2 100644
--- a/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php
+++ b/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php
@@ -481,6 +481,14 @@ location ~* ^/sites/.*/files/civicrm/(?:ConfigAndLog|upload|templates_c) {
<?php if ($nginx_config_mode == 'extended'): ?>
###
+### Deny often flooded URI for performance reasons
+###
+location = /autodiscover/autodiscover.xml {
+ access_log off;
+ return 404;
+}
+
+###
### Deny some not supported URI like cgi-bin on the Nginx level.
###
location ~* (?:cgi-bin|vti-bin) {
@@ -957,10 +965,6 @@ location ~* ^/sites/.*/files/ {
### Make feeds compatible with boost caching and set correct mime type.
###
location ~* \.xml$ {
- location ~* ^/autodiscover/autodiscover\.xml {
- access_log off;
- return 400;
- }
if ( $request_method = POST ) {
return 405;
}
diff --git a/http/Provision/Config/Nginx/subdir.tpl.php b/http/Provision/Config/Nginx/subdir.tpl.php
index 27ed837..1cea000 100644
--- a/http/Provision/Config/Nginx/subdir.tpl.php
+++ b/http/Provision/Config/Nginx/subdir.tpl.php
@@ -460,6 +460,14 @@ location ^~ /<?php print $subdir; ?> {
return 404;
}
+ ###
+ ### Deny often flooded URI for performance reasons
+ ###
+ location = /<?php print $subdir; ?>/autodiscover/autodiscover.xml {
+ access_log off;
+ return 404;
+ }
+
<?php if ($nginx_config_mode == 'extended'): ?>
###
### Responsive Images support.
@@ -823,10 +831,6 @@ location ^~ /<?php print $subdir; ?> {
### Make feeds compatible with boost caching and set correct mime type.
###
location ~* ^/<?php print $subdir; ?>/(.*\.xml)$ {
- location ~* ^/<?php print $subdir; ?>/autodiscover/autodiscover\.xml {
- access_log off;
- return 400;
- }
if ( $request_method = POST ) {
return 405;
}