shakee93 / vue-toasted

🖖 Responsive Touch Compatible Toast plugin for VueJS 2+
https://shakee93.github.io/vue-toasted/
MIT License
2.21k stars 194 forks source link

Add CSP support #151

Open gwynnarth opened 4 years ago

gwynnarth commented 4 years ago

Hello, I would like to ask for a change that makes Vue Toasted add its styles in a way that does not require unsafe-inline being present in CSP. We would like to have our CSP header as secure as possible and inline styles are definitely considered a risk.

It looks like nonce-based solution would be the best (safest and probably also easiest to implement too) option. Please see a similar request in Vue Style Loader: https://github.com/vuejs/vue-style-loader/issues/33

Thanks!

flixcor commented 3 years ago

+1. It would even be enough to just not include the styles. You can easily import the styles manually in main.js: import 'vue-toasted/dist/vue-toasted.min.css'