commit 56ce91e
Merge branch 'master' of grunfink-codeberg:grunfink/snac2
1 files changed,
+7,
-0
M
httpd.c
M
httpd.c
+7,
-0
1@@ -117,6 +117,13 @@ int server_get_handler(d_char *req, char *q_path,
2 *ctype = "application/json; charset=utf-8";
3 *body = nodeinfo_2_0();
4 }
5+ else
6+ if (strcmp(q_path, "/robots.txt") == 0) {
7+ status = 200;
8+ *ctype = "text/plain";
9+ *body = "User-agent: *\n"
10+ "Disallow: /\n";
11+ }
12
13 if (status != 0)
14 srv_debug(1, xs_fmt("server_get_handler serving '%s' %d", q_path, status));