diff options
| author | 2024-01-28 20:56:48 +0000 | |
|---|---|---|
| committer | 2024-01-28 20:56:48 +0000 | |
| commit | a88254b0a9267c24e94fcf3e81988c134ef2f6a1 (patch) | |
| tree | 798e8201c545a1ed8ab669f4b3bea5a53b9e8e07 /httpd.c | |
| parent | make compatible with subway tooter app (diff) | |
| parent | added host-meta endpoint for subwaytooter app (diff) | |
| download | snac2-a88254b0a9267c24e94fcf3e81988c134ef2f6a1.tar.gz snac2-a88254b0a9267c24e94fcf3e81988c134ef2f6a1.tar.xz snac2-a88254b0a9267c24e94fcf3e81988c134ef2f6a1.zip | |
Merge branch 'master' of https://codeberg.org/pswilde/snac2
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 8 |
1 files changed, 8 insertions, 0 deletions
| @@ -223,6 +223,14 @@ int server_get_handler(xs_dict *req, const char *q_path, | |||
| 223 | srv_baseurl); | 223 | srv_baseurl); |
| 224 | } | 224 | } |
| 225 | else | 225 | else |
| 226 | if (strcmp(q_path, "/.well-known/host-meta") == 0) { | ||
| 227 | status = 200; | ||
| 228 | *ctype = "application/xrd+xml"; | ||
| 229 | *body = xs_str_new("<XRD>" | ||
| 230 | "<Link rel=\"lrdd\" type=\"application/xrd+xml\" template=\"%s/.well-known/webfinger?resource={uri}\"/>" | ||
| 231 | "</XRD>"); | ||
| 232 | } | ||
| 233 | else | ||
| 226 | if (strcmp(q_path, "/nodeinfo_2_0") == 0) { | 234 | if (strcmp(q_path, "/nodeinfo_2_0") == 0) { |
| 227 | status = 200; | 235 | status = 200; |
| 228 | *ctype = "application/json; charset=utf-8"; | 236 | *ctype = "application/json; charset=utf-8"; |