How to avoid style src attr ?
Hello,
I'm using this module with another one, nuxt-security, that allow me to generate CSP and nonce to make my website more secure. The CSP and nonce only work on styles added in <style /> but can't work in a style-src-attr, as for example :
<div class="v-application v-theme--light v-layout v-layout--full-height v-locale--is-ltr" style="z-index:1000;">
on the other hand, this one work:
<style id="vuetify-theme-stylesheet">:root {
--v-theme-background: 255,255,255;
--v-theme-background-overlay-multiplier: 1;
--v-theme-surface: 255,255,255;
...
How do I get rid of style as an attribute and use it only in style tags?
We need to add the cspNonce entry in the theme, you can try generating the cspNonce, add a Nuxt Plugin, register vuetify:before-create hook and apply the cspNonce to the theme.
Check CSP Nonce section: https://vuetifyjs.com/en/features/theme/
I Will try to include nuxt security module integration, IIRC that module will not work on my Windows laptop.
@GreyXor yes, is it working?
Not yet, I try to figure out how to set the cspNonce vuetify setting