diff options
author | default <nobody@localhost> | 2023-04-21 23:17:58 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-04-21 23:17:58 +0200 |
commit | 526d4e8abb27127625a228796dc9c196efcfa8bf (patch) | |
tree | 76a5c05240474df1fdfc5902bdb0fe6d70cdd203 /httpd.c | |
parent | 7c5fb6f1789fb30957e820465a907648b7c8abaf (diff) |
Added a new compilation variable NO_MASTODON_API.
The Mastodon API is a big and ugly beast; if you don't want
it in your snac, you can compile it out by running
make CFLAGS=-DNO_MASTODON_API
And your snac binary will be as slim as always.
Diffstat (limited to 'httpd.c')
-rw-r--r-- | httpd.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -183,17 +183,21 @@ void httpd_connection(FILE *f) if (status == 0) status = activitypub_get_handler(req, q_path, &body, &b_size, &ctype); +#ifndef NO_MASTODON_API if (status == 0) status = oauth_get_handler(req, q_path, &body, &b_size, &ctype); if (status == 0) status = mastoapi_get_handler(req, q_path, &body, &b_size, &ctype); +#endif /* NO_MASTODON_API */ if (status == 0) status = html_get_handler(req, q_path, &body, &b_size, &ctype); } else if (strcmp(method, "POST") == 0) { + +#ifndef NO_MASTODON_API if (status == 0) status = oauth_post_handler(req, q_path, payload, p_size, &body, &b_size, &ctype); @@ -201,6 +205,7 @@ void httpd_connection(FILE *f) if (status == 0) status = mastoapi_post_handler(req, q_path, payload, p_size, &body, &b_size, &ctype); +#endif if (status == 0) status = activitypub_post_handler(req, q_path, |