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

feat: link script in head for CSP 'self' compliance in v3 #266

Open
dargmuesli opened this issue May 15, 2024 · 0 comments
Open

feat: link script in head for CSP 'self' compliance in v3 #266

dargmuesli opened this issue May 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@dargmuesli
Copy link

Is your feature request related to a problem? Please describe.

I'd like to not have any inline scripts to enforce a strict Content Security Policy.

Describe the solution you'd like

The color-mode script should not be inlined as done here

htmlContext.head.push(`<script>${script}</script>`)
but instead be an external file that is linked.

Describe alternatives you've considered

Set script-src: 'unsafe-inline' (which is unsafe)

Additional context

This was previously done for Nuxt 2 here:

htmlContext.head.push(`<script>${script}</script>`)

@dargmuesli dargmuesli added the enhancement New feature or request label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant