CSP headers

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
Mythotical
Posts: 21
Joined: 24 Aug 2020, 21:47
Contact:

CSP headers

Post 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.
cas
Posts: 989
Joined: 11 Mar 2006, 16:08
Contact:

Re: CSP headers

Post by cas »

If you would scan the core directory on files that contain "CSP" you would have found the http_api.php :mrgreen:
Mythotical
Posts: 21
Joined: 24 Aug 2020, 21:47
Contact:

Re: CSP headers

Post by Mythotical »

I looked in that file and found nothing related to CSP.
cas
Posts: 989
Joined: 11 Mar 2006, 16:08
Contact:

Re: CSP headers

Post by cas »

Perhaps you should look @ function http_security_headers() and function http_custom_headers()
Mythotical
Posts: 21
Joined: 24 Aug 2020, 21:47
Contact:

Re: CSP headers

Post by Mythotical »

Ok that was my fault, I thought I had http_api.php opened but I had html_api.php so oops.
Post Reply