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

Add 'nonce' option to context for ssr outlet style #12267

Closed
laurencedorman opened this issue Sep 10, 2021 · 2 comments
Closed

Add 'nonce' option to context for ssr outlet style #12267

laurencedorman opened this issue Sep 10, 2021 · 2 comments

Comments

@laurencedorman
Copy link

laurencedorman commented Sep 10, 2021

What problem does this feature solve?

Since 2.6.0+, if context.nonce is present, it will be added as the nonce attribute to the embedded script. This allows the inline script to conform to CSP that requires nonce. However, nonce is not currently added to any <style> tags that are generated. This feature would add nonce to the style tags so they can conform to CSP as well.

See this issue for the PR that added the nonce for the script tag : #8047

What does the proposed API look like?

No API change. If context.nonce is present, it will be added to both the script tag, and any style tags generated by vue-server-renderer

@posva
Copy link
Member

posva commented Sep 10, 2021

Is this fixed by #11826?

@laurencedorman
Copy link
Author

Oh yes thanks looks like it 👍

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