Skip to content

Missing csp in scripts and styles tags #293

@bastos71

Description

@bastos71

Request

Add nonce csp to <style> and <script> tags in blade views.

Actually when I'm reaching my app, I've got CSP issues :
image

Solution

By adding nonce="{{ csp_nonce() }}" to those tags, everything works fine (tested locally on my side by overriding the concerned blade views)

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Package Version: v19.2.0
  • Laravel Version: v10.47.0
  • PHP Version: v8.3.4
  • Template Engine: Blade
  • Using a toolset (Docker, Laradock, Vagrant, etc.): Docker

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions