From 4ccfef4a5b728d50ec9c4d2e1ca92e0a6a8c2a2d Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 18 Jun 2025 13:24:43 -0700 Subject: [PATCH] bodhi: move bot section to the right place Signed-off-by: Kevin Fenzi --- .../templates/reversepassproxy.bodhi.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.bodhi.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.bodhi.conf index 24682f030d..aa5d1e3a45 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.bodhi.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.bodhi.conf @@ -17,12 +17,6 @@ RequestHeader unset Expect early ProxyPreserveHost On {% endif %} -# Spiders-gone-wild -# These spiders may not follow robots.txt and will -# hit admin sections which consume large amounts of CPU -RewriteCond %{HTTP_USER_AGENT} "(Bytespider|ClaudeBot|Amazonbot|YandexBot|ChatGLM-Spider|GPTBot|Barkrowler|YisouSpider|MJ12bot)" [NC] -RewriteRule .* - [F,L] - {% if balancer_name is defined %} # This is something that wants a apache balancer SSLProxyEngine On @@ -64,6 +58,12 @@ BalancerMember "wss://{{ member }}" RewriteEngine on +# Spiders-gone-wild +# These spiders may not follow robots.txt and will +# hit admin sections which consume large amounts of CPU +RewriteCond %{HTTP_USER_AGENT} "(Bytespider|ClaudeBot|Amazonbot|YandexBot|ChatGLM-Spider|GPTBot|Barkrowler|YisouSpider|MJ12bot)" [NC] +RewriteRule .* - [F,L] + RewriteCond %{HTTP:Upgrade} ^WebSocket$ [NC] RewriteCond %{HTTP:Connection} Upgrade [NC] {% if remotepath is defined and remotepath != "/" %}