Browse Source

add robots.txt route

Byron Jones 6 years ago
parent
commit
fb36e8d1e3
1 changed files with 8 additions and 0 deletions
  1. 8 0
      logbot-web

+ 8 - 0
logbot-web

@@ -180,6 +180,14 @@ if (!$is_production) {
     };
 }
 
+# robots.txt
+my $robots_txt = <<'EOF';
+EOF
+get '/robots.txt' => sub {
+    my ($c) = @_;
+    $c->render(text => $robots_txt, format => 'txt');
+};
+
 # /channel => redirect to current date
 get '/#channel' => sub {
     my ($c) = @_;