-
-
Notifications
You must be signed in to change notification settings - Fork 838
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
Content Security Policy #22
Comments
Hi @syxolk , well this is not really a bug in With vue 2 there was a split into a runtime-only and standalone build. The standalone build got the template compiler included, which is needed for the If you're using *.vue files you can also use the runetime-only build because all That is why Generally there is no issue with that, however if you are in a CSP environment like chrome apps the standalone build will not work. https://vuejs.org/v2/guide/installation.html#CSP-environments The only way to get around, would be to use render functions in the base charts instead template. |
Thanks for your quick answer. I'm using the runtime-only build of vue and precompile my *.vue files with webpack/vue-loader. Therefore I added a restrictive CSP header that disallows Would be really nice if you can make it work with the runtime-only build as well. However, I don't want to spoil your Christmas Eve 🎄 Enjoy your holidays 😄 |
Hey, well its not a big deal I pushed the rewrite to https://github.com/apertureless/vue-chartjs/tree/feature/runtimebuild Need only to rewrite the tests a bit and replace the template option with the render function. And do some testing in external projects, go be sure that I didn't break anything. |
Should be fixed now in Would be great if you could test it. |
Works great for my LineChart component, tested with the same CSP header in Chrome 55 and Firefox 50. Thanks for fixing that so fast. |
Expected Behavior
Displays line chart.
Actual Behavior
Fails to render the line chart with the following errors:
Environment
I'm using this Content-Security-Policy:
Content-Security-Policy:base-uri 'self'; default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src *; connect-src 'self'; font-src 'self'; form-action 'self'; frame-ancestors 'none'
All other parts of my application work as expected until I try to render a chart for the first time.
My LineChart component looks like this:
The text was updated successfully, but these errors were encountered: