commit 5e1dbb5

grunfink  ·  2026-04-15 05:58:02 +0000 UTC
parent aa7549b
Serve the baseURL in nodeinfo's metadata.
1 files changed,  +3, -2
+3, -2
 1@@ -68,7 +68,8 @@ const char * const nodeinfo_2_0_template = ""
 2     "\"usage\":{\"users\":{\"total\":%d,\"activeMonth\":%d,\"activeHalfyear\":%d},"
 3     "\"localPosts\":%d},"
 4     "\"openRegistrations\":false,\"metadata\":{"
 5-    "\"nodeDescription\":\"%s\",\"nodeName\":\"%s\""
 6+    "\"nodeDescription\":\"%s\",\"nodeName\":\"%s\","
 7+    "\"baseURL\":\"%s\""
 8     "}}";
 9 
10 xs_str *nodeinfo_2_0(void)
11@@ -105,7 +106,7 @@ xs_str *nodeinfo_2_0(void)
12     const char *name = xs_dict_get_def(srv_config, "title", "");
13     const char *desc = xs_dict_get_def(srv_config, "short_description", "");
14 
15-    return xs_fmt(nodeinfo_2_0_template, n_utotal, n_umonth, n_uhyear, n_posts, desc, name);
16+    return xs_fmt(nodeinfo_2_0_template, n_utotal, n_umonth, n_uhyear, n_posts, desc, name, srv_baseurl);
17 }
18 
19