Welcome Guest, Not a member yet? Register   Sign In
Allow inline style attibute on element using Content Security Policy (CSP)
#9

Am actually using slick slider. So i decided to replace the background image with img and its now okay.

PHP Code:
<img src="<?= base_url($sliderimages['image_path']); ?>" alt=""


I also noticed that codeigniter does not seem to support the 'unsafe-inline'. I have the following in my BaseController

PHP Code:
$response->CSP->addStyleSrc(['self''unsafe-inline''https://fonts.googleapis.com'], false); 


The browser console shows the following warning;

Code:
Content Security Policy: Ignoring “'unsafe-inline'” within script-src or style-src: nonce-source or hash-source specified


What could be the issue here?
Reply


Messages In This Thread
RE: Allow inline style attibute on element using Content Security Policy (CSP) - by coderscvoen - 09-25-2021, 05:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB