snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit a88254b0a9267c24e94fcf3e81988c134ef2f6a1
parent 253e627ee067b1f2504dd11c7934ce51b0a2f5b2
Author: Paul Wilde <psw@wildefedi01.wildenet.wilde.cloud>
Date:   Sun, 28 Jan 2024 20:56:48 +0000

Merge branch 'master' of https://codeberg.org/pswilde/snac2

Diffstat:
Mhttpd.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/httpd.c b/httpd.c @@ -223,6 +223,14 @@ int server_get_handler(xs_dict *req, const char *q_path, srv_baseurl); } else + 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>"); + } + else if (strcmp(q_path, "/nodeinfo_2_0") == 0) { status = 200; *ctype = "application/json; charset=utf-8";