Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Content Security Policy Internet explorer error

I add Content-Security-Policy its work fine with Chrome, Firefox and Opera but with Internet Explorer 11 i have this error "This page can’t be displayed"

add_header Content-Security-Policy "connect-src 'self' wss://example.com/ws/;
                                    script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.google-analytics.com https://www.google.com https://www.gstatic.com/recaptcha/api2/recaptcha__en.js https://ajax.cloudflare.com/cdn-cgi/nexp/cloudflare.min.js;
                                    frame-src 'self' https://www.terminal.com/embed/chart-widget/ https://www.google.com/recaptcha/;
                                    img-src 'self' https://www.google-analytics.com https://chart.googleapis.com https://shape.com;
                                    ";

if i comment this section its work with IE

Why i have this error only with IE ? Thanks you

like image 978
soooo Avatar asked Jul 18 '26 04:07

soooo


1 Answers

Refering to caniuse content security policy is only partially supported through the X-Content-Security-Policy header, but not through the standard Content-Security-Policy header. Try using X-Content-Security-Policy header in IE...

like image 76
Phonolog Avatar answered Jul 19 '26 20:07

Phonolog



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!