summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelley Spoon <kelley.spoon@linaro.org>2024-03-12 08:06:22 -0500
committerKelley Spoon <kelley.spoon@linaro.org>2024-03-12 13:54:06 +0000
commitd87290d3c8d684b7d37e2cd243c02c30a6ecdcf5 (patch)
tree21295ce490dea2d5d43bc97390dbfed6d7195671
parentaa396ca261798700b113af9710e3746ab3fe8f68 (diff)
apache-site: install blocked referrers file
The blocked-refs file that listed known referrers to block from access to the server was never uploaded. Let's be sure to include it now and centralize the location of where we keep this list. Change-Id: I210bbb8c22101eb8c360397e38a26dd26ba68ef8 Signed-off-by: Kelley Spoon <kelley.spoon@linaro.org> Reviewed-on: https://review.linaro.org/c/infrastructure/ansible-playbooks/+/46860
-rw-r--r--roles/apache-site/files/block-refs.conf2
-rw-r--r--roles/apache-site/tasks/main.yml1
2 files changed, 2 insertions, 1 deletions
diff --git a/roles/apache-site/files/block-refs.conf b/roles/apache-site/files/block-refs.conf
index 09bc23bb..05427081 100644
--- a/roles/apache-site/files/block-refs.conf
+++ b/roles/apache-site/files/block-refs.conf
@@ -1,4 +1,4 @@
SetEnvIf User-Agent "Amazon Route 53 Health Check" dontlog
- RewriteCond %{HTTP_USER_AGENT} (AhrefsBot|amazonbot|bingbot|Baidu|Baiduspider|360Spider|360|MauiBot|SemrushBot|MegaIndex|PetalBot) [nocase]
+ RewriteCond ^.*(Applebot|AhrefsBot|amazonbot|bingbot|Baidu|Baiduspider|Bytespider|360Spider|360|MauiBot|SemrushBot|MegaIndex|PetalBot).*$ [nocase]
RewriteRule ^(.*)$ - [forbidden,last]
diff --git a/roles/apache-site/tasks/main.yml b/roles/apache-site/tasks/main.yml
index cc15301c..565c1d01 100644
--- a/roles/apache-site/tasks/main.yml
+++ b/roles/apache-site/tasks/main.yml
@@ -18,6 +18,7 @@
- headers-http.conf
- settings-ssl.conf
- letsencrypt.conf
+ - block-refs.conf
- name: Install ssl.conf
copy: