]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/HomeController.php
Updated 'Spanish Argentina' translation.
[bookstack] / app / Http / Controllers / HomeController.php
index 3a5fd2cb5c53ccba1a336ca6c05b0a8cfb2cd4dd..bbe1a86799bc365b107f80c3059fac7a7dafb0ef 100644 (file)
@@ -118,4 +118,20 @@ class HomeController extends Controller
     {
         return view('partials/custom-head-content');
     }
+
+    /**
+     * 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('robots', ['allowRobots' => $allowRobots])
+            ->header('Content-Type', 'text/plain');
+    }
 }