Skip to content

modern mode doesn't work with CSP #2001

@pecliu

Description

@pecliu

Version

3.0.0-rc.9

Node and OS info

Node 10.6.0 / npm 6.2.0 / Windows 7

Steps to reproduce

After add code :

    <meta http-equiv="Content-Security-Policy" content="object-src 'self'; font-src 'self' https: data:; script-src 'self' ">

to public/index.html.
Then run vue-cli-service build --modern in cmd.

What is expected?

No browser CSP error

What is actually happening?

image

The dist/index.html has inline script, which cause browsers CSP error.


Maybe can offer a parameter to set nonce-... to modern mode's inline script.

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