2

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!

seixwebdev
  • 111
  • 2
  • 4
  • 14
  • Can you share the complete error you are getting when you place csp code in BaseController. Which method? – mail2bapi Nov 13 '20 at 08:02

0 Answers0