aboutsummaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-04-15 07:58:02 +0200
committergrunfink <grunfink@comam.es>2026-04-15 07:58:02 +0200
commit5e1dbb58904ad39f20cd8e90c5d8dded2a6ca2ad (patch)
treeb35b66f70385ee008afd89924e34ce28c2cf00ac /httpd.c
parentaa7549b14fa90d6a8394844a96303ce26a9f90fe (diff)
Serve the baseURL in nodeinfo's metadata.
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/httpd.c b/httpd.c
index f4f772c..248f5fa 100644
--- a/httpd.c
+++ b/httpd.c
@@ -68,7 +68,8 @@ const char * const nodeinfo_2_0_template = ""
"\"usage\":{\"users\":{\"total\":%d,\"activeMonth\":%d,\"activeHalfyear\":%d},"
"\"localPosts\":%d},"
"\"openRegistrations\":false,\"metadata\":{"
- "\"nodeDescription\":\"%s\",\"nodeName\":\"%s\""
+ "\"nodeDescription\":\"%s\",\"nodeName\":\"%s\","
+ "\"baseURL\":\"%s\""
"}}";
xs_str *nodeinfo_2_0(void)
@@ -105,7 +106,7 @@ xs_str *nodeinfo_2_0(void)
const char *name = xs_dict_get_def(srv_config, "title", "");
const char *desc = xs_dict_get_def(srv_config, "short_description", "");
- return xs_fmt(nodeinfo_2_0_template, n_utotal, n_umonth, n_uhyear, n_posts, desc, name);
+ return xs_fmt(nodeinfo_2_0_template, n_utotal, n_umonth, n_uhyear, n_posts, desc, name, srv_baseurl);
}