Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to add 'unsafe-eval' in Content Security Policy for both handlebars and jade templates #614

Open
hemanth-r opened this issue Aug 28, 2017 · 0 comments

Comments

@hemanth-r
Copy link

Hi.
I am trying to add Content Security Policy for my site which uses OC.
But I am forced to add 'unsafe eval' to default-src directive of CSP HTTP header since OC client calls html() method of jQuery which internally uses eval().
I tried with both handlebars and jade templates. OC calls jQuery's html() method for jade template as well.
Is there any way I can get rid of allowing 'unsafe-eval' in the CSP header?

This issue can be reproduced with the following jade template example.
https://github.com/opencomponents/oc-components-examples/tree/master/jade-hello

To reproduce the issue, just add the following jade code in the file template.jade.
.script
console.log('test');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant