diff options
| -rw-r--r-- | doc/snac.8 | 4 | ||||
| -rw-r--r-- | httpd.c | 3 |
2 files changed, 4 insertions, 3 deletions
| @@ -198,9 +198,7 @@ By setting this to true, no inbox collection is done. Inbox collection helps | |||
| 198 | being discovered from remote instances, but also increases network traffic. | 198 | being discovered from remote instances, but also increases network traffic. |
| 199 | .It Ic http_headers | 199 | .It Ic http_headers |
| 200 | If you need to add more HTTP response headers for whatever reason, you can | 200 | If you need to add more HTTP response headers for whatever reason, you can |
| 201 | fill this object with the required header/value pairs. For example, for enhanced | 201 | fill this object with the required header/value pairs. |
| 202 | XSS security, you can set the "Content-Security-Policy" header to "script-src ;" | ||
| 203 | to be totally sure that no JavaScript is executed. | ||
| 204 | .It Ic show_instance_timeline | 202 | .It Ic show_instance_timeline |
| 205 | If this is set to true, the instance base URL will show a timeline with the latest | 203 | If this is set to true, the instance base URL will show a timeline with the latest |
| 206 | user posts instead of the default greeting static page. If other information | 204 | user posts instead of the default greeting static page. If other information |
| @@ -553,6 +553,9 @@ void httpd_connection(FILE *f) | |||
| 553 | headers = xs_dict_append(headers, "access-control-allow-origin", "*"); | 553 | headers = xs_dict_append(headers, "access-control-allow-origin", "*"); |
| 554 | headers = xs_dict_append(headers, "access-control-allow-headers", "*"); | 554 | headers = xs_dict_append(headers, "access-control-allow-headers", "*"); |
| 555 | 555 | ||
| 556 | /* disable any form of fucking JavaScript */ | ||
| 557 | headers = xs_dict_append(headers, "Content-Security-Policy", "script-src ;"); | ||
| 558 | |||
| 556 | if (p_state->use_fcgi) | 559 | if (p_state->use_fcgi) |
| 557 | xs_fcgi_response(f, status, headers, body, b_size, fcgi_id); | 560 | xs_fcgi_response(f, status, headers, body, b_size, fcgi_id); |
| 558 | else | 561 | else |