Ember.js based web applications CSP compatible?

Google Chromes Packaged Apps needs to comply with CSP . Assuming you compile Handlebars templates before deployment, does this apply to Ember.js?

For some reason, Google does not list Ember.js as the recommended MVC framework .

+4
source share
2 answers

At the time of writing, Ember was not compatible with CSP due to the use of eval or new Function in the code, which was mainly around Handlebars procedure templates.

With the right build tools, Ember templates can be precompiled. The grunt-ember-templates npm package will handle this for you. This package is used by the ember-app-kit , which becomes the standard Ember build tool. If you like Rails, you can use ember-appkit-rails .

If for some reason you want to use non-compiled templates, you can use the sandbox attribute to isolate your page from the Chrome application APIs and allow the use of eval.

+5
source

ember applications created with ember-cli are compatible with CSP since version 0.0.47 . hope that Google will review its recommendations.

+2
source

Source: https://habr.com/ru/post/1501714/


All Articles