I've pretty much got the gist of the content security policy from Codeigniter 4's user guide. From their example, I'll need to add the following 'runtime configuration' for my website's font:
$response->CSP->addStyleSrc('fonts.googleapis.com');
What I CAN'T seem to work out from the user guide - is where do I put this? It's not in app/Config/ContentSecurityPolicy.php
and when I tried to input it into my BaseController
I got a syntax error.
Does it go in my Controller
, for every single function, or have I missed a trick?
All guidance appreciated!