I want to enforce CSP as a security measure in my web application. From the server end , I have set the policy to "allow" self for all of its resources. However there is one particular front end node_module file , which is throwing error as attached below.
The CSP header set is : script-src 'self' 'node_modules/aurelia-webpack-plugin/runtime/empty-entry.js'; script-src-elem 'self'; style-src 'self'; img-src 'self'
Please help , I have been trying to find a solution for more than a week now! Solutions tried:
- Try the front end to make it ignore this file since it is an empty file. But I am not able to get it to ignore.
- Trying from server end to bypass this particular file by changing the rules
TIA.
Update: Error message 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 'self'"
at ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js