Skip to content

Getting cors error of script tag browser-logger-active #241

@MarkusJLechner

Description

@MarkusJLechner

Laravel Package Version

not relevant

Laravel Version

not relevant

PHP Version

not relevant

System Info

not relevant

Description

See laravel/boost/src/Services/BrowserLogger.php

Specifically this part:

<script id="browser-logger-active">

The application nonce should be configurable so it can be passed to the script tag.

One possible approach: allow passing it as a parameter to getScript in laravel/boost/src/Middleware/InjectBoost.php, with InjectBoost retrieving it from config if available.

Steps To Reproduce

  • Setting strict cors header with nonce
  • Error appears Refused to execute inline script because it violates the following Content Security Policy directive: "script-src-elem 'nonce-123123xyz=' ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions