Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Content security policy not working

I am adding to my response header this header:

x-content-security-policy default-src 'none';

I would expect no css or images to be loaded on the page, but everything is loaded. What am I doing wrong?

like image 914
MrProper Avatar asked Dec 06 '25 04:12

MrProper


1 Answers

For Chrome and newer (v. 23 and newer) versions of Firefox:

Content-Security-Policy: default-src 'none'

For Safari:

X-Webkit-CSP: default-src 'none'

For older versions of Firefox (v. 23 and older):

X-Content-Security-Policy: default-src 'none'

Sorry - with IE, only the sandbox policy is recognized, and that only in IE 10 and newer.

like image 77
Colselaw Avatar answered Dec 09 '25 14:12

Colselaw



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!