Skip to content

Possible to override CSP_INCLUDE_NONCE_IN per-view with a decorator? #139

@fallen

Description

@fallen

It would be nice to be able to use @csp_replace and @csp_update on CSP_INCLUDE_NONCE_IN.
Also, even @csp which is supposed to override everything, does not override the nonce generation.

Why?
Because some browsers like Chromium do not respect the style-src: 'unsafe-inline' if a nonce is given.
So if you generate a nonce with CSP_INCLUDE_NONCE_IN, for your entire project, but you want for some precise view to use 'unsafe-inline', you need to also have a mean to disable the nonce. Or else the browser will just ignore the 'unsafe-inline'.

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