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

Paper Elements use inline scripts => violate Chrome packaged app CSP rules #613

Closed
anaisbetts opened this issue Jul 8, 2014 · 7 comments

Comments

@anaisbetts
Copy link

Many Paper elements (paper-tabs at least) use inline Script tags which make them unusable in Chrome packaged apps. I'm coming from a non-web background so I have no idea what can be done about this, my apologies if this has been an already-filed issue (didn't see anything on search).

https://github.com/paulcbetts/chromeapp-materialdesign

@vikasprogrammer
Copy link

Use vulcanize to get rid of these CSP errors for now. But I am sure there is better solution.

@ragingwind
Copy link
Contributor

If you want to use vulcanize. You can use grunt-vulcanize with Yeoman. Have look this sample https://github.com/chromist/chrome-app-codelab/blob/master/lab05-googledrive-gallery/Gruntfile.js#L328

@dfreedm
Copy link
Member

dfreedm commented Jul 8, 2014

Oh, you can use hash and nonce now? That might be interesting for vulcanize...

@anaisbetts
Copy link
Author

@azakus I don't know that this error message is specific to Chrome Apps though, it also suggests to use unsafe-inline but that definitely doesn't work

@robdodson
Copy link
Contributor

Keep an eye on this issue as well
https://github.com/Polymer/polymer-dev/issues/42

Known problem with noscript polymer elements, vulcanize, and chrome
packaged apps in M36+

On Tue, Jul 8, 2014 at 2:45 PM, Paul Betts [email protected] wrote:

@azakus https://github.com/azakus I don't know that this error message
is specific to Chrome Apps though, it also suggests to use unsafe-inline
but that definitely doesn't work


Reply to this email directly or view it on GitHub
#613 (comment).

@kevinpschaaf
Copy link
Member

Closing, as vulcanize --csp is the supported solution for dealing with CSP environments.

https://github.com/Polymer/vulcanize/issues/37 is now resolved, which fixes a latent with Polymer still injecting inline scripts for noscript elements even when vulcanize --csp'ed.

@anaisbetts
Copy link
Author

In case anyone stumbles upon this bug in the future, https://github.com/PolymerLabs/polymerchromeapp is a great "Getting Started" for using Paper Elements in Chrome packaged apps

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

6 participants