X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FRobotsTxt.php;h=a084c1f4a6caf97c168b501e7df2f2daa11a8b86;hb=e1863951986ba5be173758324a00652bc5af870c;hp=db83777e8e4ff02e3d8c597c78623eadd91580fc;hpb=8c03bdada92845974ecadeecb9e673c7ffac22b4;p=friendica.git diff --git a/src/Module/RobotsTxt.php b/src/Module/RobotsTxt.php index db83777e8e..a084c1f4a6 100644 --- a/src/Module/RobotsTxt.php +++ b/src/Module/RobotsTxt.php @@ -1,30 +1,61 @@ . + * + */ namespace Friendica\Module; use Friendica\BaseModule; +use Friendica\Core\System; /** * Return the default robots.txt */ class RobotsTxt extends BaseModule { - public static function rawContent(array $parameters = []) + protected function rawContent(array $request = []) { - $allDisalloweds = [ + $allDisallowed = [ '/settings/', '/admin/', '/message/', '/search', '/help', '/proxy', + '/photo', + '/avatar', ]; header('Content-Type: text/plain'); echo 'User-agent: *' . PHP_EOL; - foreach ($allDisalloweds as $disallowed) { + foreach ($allDisallowed as $disallowed) { echo 'Disallow: ' . $disallowed . PHP_EOL; } - exit(); + + echo PHP_EOL; + echo 'User-agent: ChatGPT-User' . PHP_EOL; + echo 'Disallow: /' . PHP_EOL; + + echo PHP_EOL; + echo 'User-agent: GPTBot' . PHP_EOL; + echo 'Disallow: /' . PHP_EOL; + + System::exit(); } }