blob: b31c2bb359711977e51c1544f5eb1567c9af96b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
AddHandler fcgid-script .pl
<%- @script_aliases.keys.sort {|a,b| a.size <=> b.size }.reverse.each do |key| -%>
ScriptAlias <%= key %> <%= @script_aliases[key] %>
<%- end -%>
FcgidMinProcessesPerClass <%= @process %>
FcgidIdleTimeout 30
# These robots were scraping the whole of svnweb in 2024-04, causing severe
# load, so they are banned. It's not clear whether they obey robots.txt or
# not (we didn't give them enough of a chance to find out), so we could
# consider giving them a chance to redeem themselves at some point in the
# future.
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ClaudeBot|Amazonbot
RewriteRule . - [R=403,L]
# Block expensive SVN operations on all common robots ("spider" covers a
# bunch). "Expensive" is considered to be most operations other than showing a
# directory or downloading a specific version of a file.
RewriteCond %{QUERY_STRING} pathrev=|annotate=|view=log|r1=
RewriteCond %{HTTP_USER_AGENT} "Googlebot|bingbot|Yahoo! Slurp|ClaudeBot|Amazonbot|YandexBot|SemrushBot|Barkrowler|DataForSeoBot|PetalBot|facebookexternalhit|GPTBot|ImagesiftBot|spider|Spider"
RewriteRule . - [R=403,L]
# Block abusive spiders by IP address who don't identify themselves in the
# User-Agent: string
RewriteCond expr "-R '47.76.99.0/24' || -R '47.76.209.0/24'"
RewriteRule . - [R=403,L]
ErrorDocument 403 "<html><body>Impolite robots are not allowed</body></html>"
|