duck.cspยถ
Content-Security utility module.
Module Contentsยถ
Functionsยถ
Returns the current nonce token for the strict |
|
Refreshes and returns a newly generated nonce value. |
Dataยถ
APIยถ
- duck.csp.csp_nonce(request, add_nonce_prefix: bool = False) str[source]ยถ
Returns the current nonce token for the strict
Content-Security-Policy.- Parameters:
request โ The target HTTP request.
add_nonce_prefix โ Whether to add the prefix
nonce-to the nonce value.
- duck.csp.csp_nonce_flagยถ
โrequires-csp-nonceโ