From 21a99e55081a58f1396d49fb70824f91a8e7c2ab Mon Sep 17 00:00:00 2001 From: green Date: Wed, 9 Apr 2025 03:09:53 +0200 Subject: emoji: refactor + emoji in display names on front page --- httpd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httpd.c') diff --git a/httpd.c b/httpd.c index 22a148d..836c256 100644 --- a/httpd.c +++ b/httpd.c @@ -139,6 +139,8 @@ static xs_str *greeting_html(void) snac user; if (strcmp(uid, "relay") && user_open(&user, uid)) { + xs *formatted_name = format_text_with_emoji(NULL, xs_dict_get(user.config, "name"), 1, NULL); + xs_html_add(ul, xs_html_tag("li", xs_html_tag("a", @@ -148,7 +150,7 @@ static xs_str *greeting_html(void) xs_html_text("@"), xs_html_text(host), xs_html_text(" ("), - xs_html_text(xs_dict_get(user.config, "name")), + xs_html_raw(formatted_name), xs_html_text(")")))); user_free(&user); -- cgit v1.2.3 From 38ff37703ef9286b86ee18c81e70f0e218207373 Mon Sep 17 00:00:00 2001 From: grunfink Date: Fri, 9 May 2025 08:37:16 +0200 Subject: Added header "access-control-expose-headers" with the "Link" value. This helps paging in Mastodon clients. --- httpd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'httpd.c') diff --git a/httpd.c b/httpd.c index 836c256..6f7d69b 100644 --- a/httpd.c +++ b/httpd.c @@ -556,6 +556,7 @@ void httpd_connection(FILE *f) headers = xs_dict_append(headers, "access-control-allow-origin", "*"); headers = xs_dict_append(headers, "access-control-allow-headers", "*"); + headers = xs_dict_append(headers, "access-control-expose-headers", "Link"); /* disable any form of fucking JavaScript */ headers = xs_dict_append(headers, "Content-Security-Policy", "script-src ;"); -- cgit v1.2.3