diff options
author | default <nobody@localhost> | 2024-01-30 08:09:43 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-01-30 08:09:43 +0100 |
commit | 644138b2b9b3fa7cae8d34d5580c63ff06e66bd7 (patch) | |
tree | 42b6916de057d787cf56936866157c753582f0f4 | |
parent | b3e289b40b5c89acc1bf5cdc7b68f2e0f058dfe3 (diff) |
Minor tweak to host-meta.
-rw-r--r-- | httpd.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -226,9 +226,10 @@ int server_get_handler(xs_dict *req, const char *q_path, if (strcmp(q_path, "/.well-known/host-meta") == 0) { status = 200; *ctype = "application/xrd+xml"; - *body = xs_str_new("<XRD>" - "<Link rel=\"lrdd\" type=\"application/xrd+xml\" template=\"%s/.well-known/webfinger?resource={uri}\"/>" - "</XRD>"); + *body = xs_fmt("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<XRD>" + "<Link rel=\"lrdd\" type=\"application/xrd+xml\" template=\"https://%s/.well-known/webfinger?resource={uri}\"/>" + "</XRD>", xs_dict_get(srv_config, "host")); } else if (strcmp(q_path, "/nodeinfo_2_0") == 0) { |