Merge pull request #13337 from annando/block-chatgpt

Add a ChatGPT role for the built in robots.txt
This commit is contained in:
Hypolite Petovan 2023-08-10 23:18:46 +02:00 committed by GitHub
commit a2fce0e89d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,6 +45,11 @@ class RobotsTxt extends BaseModule
foreach ($allDisallowed as $disallowed) {
echo 'Disallow: ' . $disallowed . PHP_EOL;
}
echo PHP_EOL;
echo 'User-agent: ChatGPT-User' . PHP_EOL;
echo 'Disallow: /' . PHP_EOL;
System::exit();
}
}