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

Feature Request: support nuxt-security csp dynamically #292

Open
zakarialounes opened this issue Nov 28, 2024 · 0 comments
Open

Feature Request: support nuxt-security csp dynamically #292

zakarialounes opened this issue Nov 28, 2024 · 0 comments

Comments

@zakarialounes
Copy link

zakarialounes commented Nov 28, 2024

Currently it is only possible to set a csp nonce via theme.cspNonce configuration object (will therefore be static). This should be possible dynamically.

useTheme() via the global property already allows changing the theme, it would be useful to be able to set/change the nonce in the same way. It will probably be necessary to add a vuetify nitro hook in order to allow us to change the csp token before rendering?

For reference:

// change theme 
const vuetifyTheme = useTheme()
const changeTheme = () => {
  vuetifyTheme.global.name.value = getNextThemeName()
};
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

1 participant