summaryrefslogtreecommitdiff
path: root/app/Http/RequestHandlers/RobotsTxt.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2025-03-07 22:04:23 +0000
committerGreg Roach <greg@subaqua.co.uk>2025-03-09 17:44:42 +0000
commit0c64d13f39c9d8fb9584458874846bace4d0a6ef (patch)
tree53695b8fd54eec2cb181d70cbc898e7e7d02368f /app/Http/RequestHandlers/RobotsTxt.php
parentc5da51bc61371d1d6d41497589012378b099e9a3 (diff)
downloadwebtrees-0c64d13f39c9d8fb9584458874846bace4d0a6ef.tar.gz
webtrees-0c64d13f39c9d8fb9584458874846bace4d0a6ef.tar.bz2
webtrees-0c64d13f39c9d8fb9584458874846bace4d0a6ef.zip
Fix: #5112 - use the list of user-agents from ai-robots-txt as a blacklist
Diffstat (limited to 'app/Http/RequestHandlers/RobotsTxt.php')
-rw-r--r--app/Http/RequestHandlers/RobotsTxt.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Http/RequestHandlers/RobotsTxt.php b/app/Http/RequestHandlers/RobotsTxt.php
index 3b10c13389..b06bdfccd2 100644
--- a/app/Http/RequestHandlers/RobotsTxt.php
+++ b/app/Http/RequestHandlers/RobotsTxt.php
@@ -72,7 +72,7 @@ class RobotsTxt implements RequestHandlerInterface
$trees = $this->tree_service->all()->map(static fn (Tree $tree): string => $tree->name());
$data = [
- 'bad_user_agents' => BadBotBlocker::BAD_ROBOTS,
+ 'bad_user_agents' => [...BadBotBlocker::AI_ROBOTS, ...BadBotBlocker::BAD_ROBOTS],
'base_url' => $base_url,
'base_path' => parse_url($base_url, PHP_URL_PATH) ?? '',
'disallowed_paths' => self::DISALLOWED_PATHS,