22 questions
0 votes
0 answers
63 views
PWA content-security-policy Failed to execute importScripts on WorkerGlobalScope
I've got a PWA app that works fine with script-src 'self'; worker-src 'self' content-security-policy header and I'm trying to tighten security using hashes. I have the index.html file like below <...
0 votes
1 answer
64 views
Chrome extension local script violates CSP, manifest.json not recognizing "script-src-elem"
I'm trying to write a Chrome extension that uses the MathJax library. I'm using a local copy of the MathJax code in my extension, which I load as a content script in manifest.json: { "name"...
1 vote
1 answer
485 views
unsafe-eval in the handlebar.min.js
Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-...
0 votes
0 answers
259 views
Content security policy Issue for ZAP scan with -unsafe-inline' option
In my application, I am configuring the Content Security Policy for script-src and style-src. When I include the 'unsafe-inline' option, it raises a vulnerability issue during the ZAP security scan. ...
4 votes
3 answers
8k views
Why does CSP script-src unsafe-inline induce styling issues on my Angular webapp?
The issue: When I try to remove unsafe-inline source for script-src CSP my Angular webapp does not work anymore. What is the root cause of this issue ? When using SCSS in Angular@12+, Angular add a ...
1 vote
1 answer
1k views
Struts2-core-6.1.1 with Content-Security-Policy HTTP header
I'm migrating a struts2-core-2.5.30 project to struts2-core-6.1.1, however I was getting the following error: Refused to execute inline event handler because it violates the following Content Security ...
0 votes
1 answer
268 views
Is bootstrap.min.js CSP compatible?
I am importing the bootstrap.min.js library file in my AngularJS project. The problem arises when I add the following CSP line to my project: <httpProtocol> <customHeaders> <...
0 votes
0 answers
570 views
Script-src in CSP breaks Wordpress site
Our typical approach with security headers with all our Wordpress sites is to use the Security Headers plugin, which allows for modification to CSP (or other headers, as needed). A security team of ...
2 votes
2 answers
12k views
Refused to load the script : Content-Security-Policy
Refused to load the script 'https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js' because it violates the following Content Security Policy directive: "script-src 'self'". Note ...
0 votes
2 answers
428 views
How can I configure Tinymce so that it doesn't strip javascript code?
I’ve inherited an old website after the previous developer passed away. Foolish perhaps but they are good people doing good things in our community so I offered to help. The site uses an old version ...
0 votes
1 answer
923 views
How to properly set hashes in script-src CSP policy header?
I'm trying to get SCP working with hashes. I'm inserting the hashes both in the header (Content-Security-Policy) and in the html page. When I disable CSP and only use SRI, everything works. But when I ...
-1 votes
2 answers
578 views
Laravel, how to add a script in a blade page? The script loading a resource to inline was blocked by page settings (“script-src”)
I run a Laravel application not developed by me, as I'm not a developer. This Laravel app show a user page interface where I need put a custom script live chat code. I found where is the relative ...
0 votes
1 answer
553 views
apache 2 script-src permission issue in content security policy
I need to implement a content security policy for a customer. Everything works well except for the js scripts. I need to allow external js scripts. Code in my vhost apache : Header set X-Content-Type-...
0 votes
2 answers
203 views
How can I configure jQuery to ensure external scripts (src="...") remain external when injecting markup using .html()?
I've observed that when I utilize jQuery's .html('...') method to insert markup containing an external <script src="..."></script> tag, jQuery doesn't insert the script tag ...
1 vote
0 answers
85 views
Amcharts 5 trying to change src tag to load different data set for stock chart
I've broken down 10+ years of 15-minute candlestick data into single years in order for it to load more quickly. I am relatively new to coding and am modifying one of amcharts terrific demos to see if ...