mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
added host-meta endpoint for subwaytooter app
This commit is contained in:
parent
7de892bd83
commit
2965f1ede4
8
httpd.c
8
httpd.c
@ -223,6 +223,14 @@ int server_get_handler(xs_dict *req, const char *q_path,
|
|||||||
srv_baseurl);
|
srv_baseurl);
|
||||||
}
|
}
|
||||||
else
|
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) {
|
if (strcmp(q_path, "/nodeinfo_2_0") == 0) {
|
||||||
status = 200;
|
status = 200;
|
||||||
*ctype = "application/json; charset=utf-8";
|
*ctype = "application/json; charset=utf-8";
|
||||||
|
Loading…
Reference in New Issue
Block a user