Skip to content

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

Closed
@laurencedorman

Description

@laurencedorman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions