Skip to content

Allow direct editing of build policy output #192

@dgabrahams

Description

@dgabrahams

It will allow greater versatility and customisation if the build_policy function was made to return the csp variable before it is changed into policy_parts (https://github.com/mozilla/django-csp/blob/main/csp/utils.py#L90). It would be required to refactor the addition of nonce and final string construction (https://github.com/mozilla/django-csp/blob/main/csp/utils.py#L111) to new functions. Developers could then hook into the output of build_policy ordering/appending as required and then returning the nonce and string construction function outputs as required.

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