Page 1 of 1

CSP headers

Posted: 05 Sep 2020, 05:24
by Mythotical
I'm working on adding reCaptcha and hCaptcha to the core files on a pull request giving admins the choice on which Captcha to use. Anyway, I'm trying to find where CSP is handled so I can add the sites for google and hCaptcha to the headers.

I can do it by a plugin for the time being but would rather edit core files since I plan to submit this to MantisBT team for inclusion in the next release version.

Re: CSP headers

Posted: 05 Sep 2020, 08:51
by cas
If you would scan the core directory on files that contain "CSP" you would have found the http_api.php :mrgreen:

Re: CSP headers

Posted: 05 Sep 2020, 09:33
by Mythotical
I looked in that file and found nothing related to CSP.

Re: CSP headers

Posted: 05 Sep 2020, 09:47
by cas
Perhaps you should look @ function http_security_headers() and function http_custom_headers()

Re: CSP headers

Posted: 05 Sep 2020, 10:00
by Mythotical
Ok that was my fault, I thought I had http_api.php opened but I had html_api.php so oops.