I am using Angular 10 application . Due to the CSP issue, I need to remove unsafe-eval from script-src, now the issue appearing all the ngOnDestroy() having ngx bootstrap modal hide() and I am having issue on following code:
ngOnDestroy(): void {
this.bsModalRef.hide();
}
the error is :
ERROR 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' app.pendo.io data.pendo.io cdn.pendo.io pendo-io-static.storage.googleapis.com pendo-static * gateway.zscalertwo.net about:".
Can anyone please suggest what I should insert in script src to remove above error. My full meta tag is as follow:
<meta http-equiv="Content-Security-Policy" content="style-src 'self' app.pendo.io cdn.pendo.io pendo-static * 'unsafe-inline'; script-src 'self' app.pendo.io data.pendo.io cdn.pendo.io pendo-io-static.storage.googleapis.com pendo-static * gateway.zscalertwo.net about: ;
img-src * data: https: blob: ; frame-src https: http: 'self' *.walkme.com *.google-analytics.com *.data.pendo.io *.cdn.pendo.io *.pendo-io-static.storage.googleapis.com *.pendo-static *;
"/>