X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/e6ea53b3e68932deb2a38359af8cbc34d10735b0..refs/pull/2510/head:/app/Http/Controllers/HomeController.php diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index d97740d27..3258f4369 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -110,15 +110,16 @@ class HomeController extends Controller /** * Show the view for /robots.txt - * @return $this */ public function getRobots() { $sitePublic = setting('app-public', false); $allowRobots = config('app.allow_robots'); + if ($allowRobots === null) { $allowRobots = $sitePublic; } + return response() ->view('common.robots', ['allowRobots' => $allowRobots]) ->header('Content-Type', 'text/plain');