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

How to avoid style src attr ? #56

Open
GreyXor opened this issue Jul 20, 2023 · 3 comments
Open

How to avoid style src attr ? #56

GreyXor opened this issue Jul 20, 2023 · 3 comments

Comments

@GreyXor
Copy link

GreyXor commented Jul 20, 2023

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?

@userquin
Copy link
Member

userquin commented Jul 20, 2023

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.

@userquin
Copy link
Member

@GreyXor yes, is it working?

@GreyXor
Copy link
Author

GreyXor commented Jul 20, 2023

Not yet, I try to figure out how to set the cspNonce vuetify setting

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

2 participants