Skip to main content

csp

Add the CSP nonce to the context.

def csp(
request: HttpRequest
) - > dict

Add the CSP nonce to the context.

Parameters

NameTypeDescription
requestHttpRequestThe incoming HTTP request object used to retrieve or generate the security nonce.

Returns

TypeDescription
dictA dictionary containing the Content Security Policy (CSP) nonce associated with the specific request key.