commit a88254b
Merge branch 'master' of https://codeberg.org/pswilde/snac2
1 files changed,
+8,
-0
M
httpd.c
M
httpd.c
+8,
-0
1@@ -223,6 +223,14 @@ int server_get_handler(xs_dict *req, const char *q_path,
2 srv_baseurl);
3 }
4 else
5+ if (strcmp(q_path, "/.well-known/host-meta") == 0) {
6+ status = 200;
7+ *ctype = "application/xrd+xml";
8+ *body = xs_str_new("<XRD>"
9+ "<Link rel=\"lrdd\" type=\"application/xrd+xml\" template=\"%s/.well-known/webfinger?resource={uri}\"/>"
10+ "</XRD>");
11+ }
12+ else
13 if (strcmp(q_path, "/nodeinfo_2_0") == 0) {
14 status = 200;
15 *ctype = "application/json; charset=utf-8";