diff options
| author | Oliver <zen@noreply.codeberg.org> | 2025-05-21 21:11:47 +0200 |
|---|---|---|
| committer | Oliver <zen@noreply.codeberg.org> | 2025-05-21 21:11:47 +0200 |
| commit | 979718e3cc5489efdce2acc6f8c86f6d00bb91c7 (patch) | |
| tree | 7b4936bdb5ea07c7dd617d508c487d70020f0146 /httpd.c | |
| parent | 1b0804bb0da0ef89aef98d9a771d2aa5bfeb34d7 (diff) | |
| parent | 5059fadf34b79a9f596313b0bd859c1eb89342ae (diff) | |
Merge pull request 'master refresh' (#8) from grunfink/snac2:master into master
Reviewed-on: https://codeberg.org/zen/snac2/pulls/8
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); @@ -554,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 ;"); |