Skip to content

__webpack_nonce__ support or alternative way of solving CSP? #306

Closed
@madjam002

Description

@madjam002

I'm looking at using Webpack on a site which requires strict Content Security Policy headers.

I'm setting window.__webpack_nonce__ but it doesn't seem to be adding a nonce attribute to style elements created by style-loader. Looking at webpack#3210 it only seems to be adding a nonce attribute to generated script elements? Is there some additional work required in style-loader to support nonce attributes?

I don't mind doing a PR, just wanted to make sure first though that I'm not missing something!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions