diff options
| author | 2025-02-17 20:54:36 +0100 | |
|---|---|---|
| committer | 2025-02-17 20:54:36 +0100 | |
| commit | 7eb2556f26baf8ff79fcb7388712d8b714efc4f6 (patch) | |
| tree | 0d11017b6431c514bd6afd16138a06851cd2f09e /httpd.c | |
| parent | Merge tag '2.72' into curl-smtp (diff) | |
| parent | Merge pull request 'doc/snac8: elaborate regex blocking' (#305) from Menelmac... (diff) | |
| download | snac2-7eb2556f26baf8ff79fcb7388712d8b714efc4f6.tar.gz snac2-7eb2556f26baf8ff79fcb7388712d8b714efc4f6.tar.xz snac2-7eb2556f26baf8ff79fcb7388712d8b714efc4f6.zip | |
Merge remote-tracking branch 'upstream/master' into curl-smtp
Diffstat (limited to '')
| -rw-r--r-- | httpd.c | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -211,6 +211,8 @@ int server_get_handler(xs_dict *req, const char *q_path, | |||
| 211 | { | 211 | { |
| 212 | int status = 0; | 212 | int status = 0; |
| 213 | 213 | ||
| 214 | const snac *user = NULL; | ||
| 215 | |||
| 214 | /* is it the server root? */ | 216 | /* is it the server root? */ |
| 215 | if (*q_path == '\0' || strcmp(q_path, "/") == 0) { | 217 | if (*q_path == '\0' || strcmp(q_path, "/") == 0) { |
| 216 | const xs_dict *q_vars = xs_dict_get(req, "q_vars"); | 218 | const xs_dict *q_vars = xs_dict_get(req, "q_vars"); |
| @@ -553,6 +555,9 @@ void httpd_connection(FILE *f) | |||
| 553 | headers = xs_dict_append(headers, "access-control-allow-origin", "*"); | 555 | headers = xs_dict_append(headers, "access-control-allow-origin", "*"); |
| 554 | headers = xs_dict_append(headers, "access-control-allow-headers", "*"); | 556 | headers = xs_dict_append(headers, "access-control-allow-headers", "*"); |
| 555 | 557 | ||
| 558 | /* disable any form of fucking JavaScript */ | ||
| 559 | headers = xs_dict_append(headers, "Content-Security-Policy", "script-src ;"); | ||
| 560 | |||
| 556 | if (p_state->use_fcgi) | 561 | if (p_state->use_fcgi) |
| 557 | xs_fcgi_response(f, status, headers, body, b_size, fcgi_id); | 562 | xs_fcgi_response(f, status, headers, body, b_size, fcgi_id); |
| 558 | else | 563 | else |