Skip to content

Add support for nonce attribute (CSP) #455

Closed

Description

@necolas

New part of CSP and shipped in Chrome 36. Applies to <script> and <style> tags: https://w3c.github.io/webappsec/specs/content-security-policy/#script-src-the-nonce-attribute

AFAICT, you can't yet add attributes to the script and style tags that webpack creates.

(Not familiar with this; saw it in a patch from our security team and thought people using webpack will eventually want this feature.)

Activity

  1. jhnns commented on Sep 9, 2014

    @jhnns
    Contributor

    What's the use-case of the nonce attribute?

  2. bebraw commented on Apr 17, 2016

    @bebraw
    Contributor

    @necolas Maybe this would be more relevant for html-webpack-plugin since it generates those tags for each bundle?

  3. necolas commented on Apr 17, 2016

    @necolas
    Author

    I don't think so. Webpack is responsible for code-splitting and injecting scripts/styles for async chunks. The style-loader might be the place for style nonce though.

  4. bebraw commented on Apr 17, 2016

    @bebraw
    Contributor

    @necolas Ok, cool. Thanks for clearing that up. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions