]> git.mxchange.org Git - friendica.git/blob - src/Module/RobotsTxt.php
parameters now are having a default value and are optional
[friendica.git] / src / Module / RobotsTxt.php
1 <?php
2
3 namespace Friendica\Module;
4
5 use Friendica\BaseModule;
6
7 /**
8  * Return the default robots.txt
9  */
10 class RobotsTxt extends BaseModule
11 {
12         public static function rawContent(array $parameters = [])
13         {
14                 $allDisalloweds = [
15                         '/settings/',
16                         '/admin/',
17                         '/message/',
18                         '/search',
19                         '/help',
20                         '/proxy',
21                 ];
22
23                 header('Content-Type: text/plain');
24                 echo 'User-agent: *' . PHP_EOL;
25                 foreach ($allDisalloweds as $disallowed) {
26                         echo 'Disallow: ' . $disallowed . PHP_EOL;
27                 }
28                 exit();
29         }
30 }