Skip to content

Refused to execute inline script #1923

@metapodcod

Description

@metapodcod

Issue details

Please provide issue details here.

  • Even though I didn't make any changes to my code, when I woke up in the morning I ran my "gulp" project and got such a strange error

Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-ACotEtBlkqjCUAsddlA/3p2h7Q0iHuDXxk577uNsXwA='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

  • the seventh line is said to have an error, the content of the seventh line is as follows
<script id="__bs_script__">//<![CDATA[
    document.write("<script async src='/browser-sync/browser-sync-client.js?v=2.27.7'><\/script>".replace("HOST", location.hostname));
//]]></script>

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [ 2.27.7 ]
  • Node [ 14.18.2 ]
  • Npm [ 8.3.0 ]

Affected platforms

  • [ x ] linux- Windows10 WSL

Browsersync use-case

  • [ x ] Gulp

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