diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2025-03-07 22:04:23 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2025-03-09 17:44:42 +0000 |
| commit | 0c64d13f39c9d8fb9584458874846bace4d0a6ef (patch) | |
| tree | 53695b8fd54eec2cb181d70cbc898e7e7d02368f /app/Http/RequestHandlers/RobotsTxt.php | |
| parent | c5da51bc61371d1d6d41497589012378b099e9a3 (diff) | |
| download | webtrees-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.php | 2 |
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, |
