Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow direct editing of build policy output #192

Open
dgabrahams opened this issue Nov 30, 2022 · 1 comment
Open

Allow direct editing of build policy output #192

dgabrahams opened this issue Nov 30, 2022 · 1 comment

Comments

@dgabrahams
Copy link

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.

@some1ataplace

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants