You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VueJs use eval to compile its template. However, the template and component can generally be pre-compiled to JS to avoid those runtime eval.
CSP is used by website to prevent unexpected XSS.
In my case, when developping a Chrome extension, pages are runned with the header include above. (script-src 'self'; ...)
Actual behaviour
The error that is shown in the console :
The Content Security Policy (CSP) prevents the evaluation of arbitrary strings as JavaScript to make it more difficult for an attacker to inject unathorized code on your site.
To solve this issue, avoid using eval(), new Function(), setTimeout([string], ...) and setInterval([string], ...) for evaluating strings.
If you absolutely must: you can enable string evaluation by adding unsafe-eval as an allowed source in a script-src directive.
...
I think the faulty code is the following:
The text was updated successfully, but these errors were encountered:
Reproduction Link
(jsfiddle can't be used because the vue template are not compiled)
Steps to reproduce
Use the header
Include the component in your template (no special configuration needed)
Expected behaviour
VueJs use
eval
to compile its template. However, the template and component can generally be pre-compiled to JS to avoid those runtime eval.CSP is used by website to prevent unexpected XSS.
In my case, when developping a Chrome extension, pages are runned with the header include above. (
script-src 'self'; ...
)Actual behaviour
The error that is shown in the console :
I think the faulty code is the following:
The text was updated successfully, but these errors were encountered: