| |
@@ -3,8 +3,13 @@
|
| |
RewriteCond %{HTTP_USER_AGENT} "lftp"
|
| |
RewriteRule ^.*$ https://fedoraproject.org/wiki/Infrastructure/Mirroring#Tools_to_avoid [R,L]
|
| |
|
| |
- RewriteRule ^/$ /pub [R=302,L]
|
| |
+ # 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]
|
| |
|
| |
+ RewriteRule ^/$ /pub [R=302,L]
|
| |
|
| |
RedirectMatch 302 ^/pub/fedora/linux/atomic/(.*$) https://kojipkgs.fedoraproject.org/atomic/$1
|
| |
RedirectMatch 302 ^/pub/fedora/linux/atomic https://kojipkgs.fedoraproject.org/atomic/
|
| |
I went through the last couple of logs afer the first round of 'turn
off the spiders' went out. I looked at the areas which the /robots.txt
disregard and then looked for the bots which ignored it and still
looked up stuff in 'accounts'. This may cut down CPU spikes as these
are looking at dynamic data which can 'blow' things up.
It might be good to add similar tooling to pagure and src since they
seem to be hit a lot in the logs also.
Signed-off-by: Stephen Smoogen ssmoogen@redhat.com