diff options
| author | default <nobody@localhost> | 2025-02-13 19:44:21 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2025-02-13 19:44:21 +0100 |
| commit | 292b2fd1224a40fd3fa5bc33248a7b11316abc22 (patch) | |
| tree | 98eed1cf462048ee337e27cdc6652b02e1dadc50 /httpd.c | |
| parent | e237a35f0d51683511e87e68c2fe3fd9bdf3ef9e (diff) | |
Force the Content-Security-Policy header, instead of just suggesting it in the docs.
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -553,6 +553,9 @@ void httpd_connection(FILE *f) headers = xs_dict_append(headers, "access-control-allow-origin", "*"); headers = xs_dict_append(headers, "access-control-allow-headers", "*"); + /* disable any form of fucking JavaScript */ + headers = xs_dict_append(headers, "Content-Security-Policy", "script-src ;"); + if (p_state->use_fcgi) xs_fcgi_response(f, status, headers, body, b_size, fcgi_id); else |