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 != "/" %}