From 615ad78144c2772cb815844a23bb682f816d67a2 Mon Sep 17 00:00:00 2001 From: natalie roentgen connolly Date: Mon, 23 Jun 2025 05:59:32 -0700 Subject: [PATCH] add robots.txt --- srv/content/router.hy | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/srv/content/router.hy b/srv/content/router.hy index 18396f8..359b525 100644 --- a/srv/content/router.hy +++ b/srv/content/router.hy @@ -52,6 +52,16 @@ :headers headers :body data))) + + (when (= path "/robots.txt") + (when (!= method "GET") + (return (error 405 "method not allowed"))) + + (return (dict + :code 200 + :headers {"Content-Type" "text/plain"} + :body "user-agent: *\ndisallow: /\n"))) + (when (= path "/") (when (!= method "GET") (return (error 405 "method not allowed")))