commit 644138b

default  ·  2024-01-30 07:09:43 +0000 UTC
parent b3e289b
Minor tweak to host-meta.
1 files changed,  +4, -3
+4, -3
 1@@ -226,9 +226,10 @@ int server_get_handler(xs_dict *req, const char *q_path,
 2     if (strcmp(q_path, "/.well-known/host-meta") == 0) {
 3         status = 200;
 4         *ctype = "application/xrd+xml";
 5-        *body  = xs_str_new("<XRD>"
 6-                "<Link rel=\"lrdd\" type=\"application/xrd+xml\" template=\"%s/.well-known/webfinger?resource={uri}\"/>"
 7-                "</XRD>");
 8+        *body  = xs_fmt("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
 9+                "<XRD>"
10+                "<Link rel=\"lrdd\" type=\"application/xrd+xml\" template=\"https://%s/.well-known/webfinger?resource={uri}\"/>"
11+                "</XRD>", xs_dict_get(srv_config, "host"));
12     }
13     else
14     if (strcmp(q_path, "/nodeinfo_2_0") == 0) {