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’