summaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-12-13 09:19:51 +0100
committerdefault <nobody@localhost>2022-12-13 09:19:51 +0100
commit56ce91eea0258f370359bcb813c292a2e096b2ae (patch)
treed58a60a1deee65d51609d7159141179e629975aa /httpd.c
parente09a4051c69801870d0605e26bdacc68cc81be98 (diff)
parent99c3ec1601caf6b34e098b39e0ae20c8fe4ce486 (diff)
Merge branch 'master' of grunfink-codeberg:grunfink/snac2
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/httpd.c b/httpd.c
index ae49189..e05a0c2 100644
--- a/httpd.c
+++ b/httpd.c
@@ -117,6 +117,13 @@ int server_get_handler(d_char *req, char *q_path,
*ctype = "application/json; charset=utf-8";
*body = nodeinfo_2_0();
}
+ else
+ if (strcmp(q_path, "/robots.txt") == 0) {
+ status = 200;
+ *ctype = "text/plain";
+ *body = "User-agent: *\n"
+ "Disallow: /\n";
+ }
if (status != 0)
srv_debug(1, xs_fmt("server_get_handler serving '%s' %d", q_path, status));