Skip to content

support for multiple Content-Security-Policy directives via typed headers #3719

@dontgitit

Description

@dontgitit

Is your feature request related to a problem? Please describe.
The current implementation of the ContentSecurityPolicy header only supports a single directive.
This header typically includes multiple directives.

Describe the solution you'd like
I'd like for the CSP header to support multiple directives.

Describe alternatives you've considered
There are currently two workarounds;

  1. Using Header.Custom and providing the full CSP as the value
  2. Providing multiple CSP headers, each containing a single directive; however, this is tricky and comes with gotchas

Additional context
Mozilla
CSP Quick Reference Guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions