gotwarlost/istanbul

Content-Security-Policy unsafe-eval

tudorgergely opened this issue · 1 comments

Hi!

I have an issue with istanbul coverage object on window and our CSP. The coverage report is working great locally but we also want to instrument an app we deploy to a certain environment.

We don't allow unsafe-eval in our CSP and because the instrumenter uses Function() it fails our CSP:

"var %VAR% = (Function('return this'))();",

Is it possible to get around or fix this? Do you have alternatives to Function() in this case?

Thank you!

hey @tudorgergely, were you able to fix this?