MCPcopy
hub / github.com/django/django / get_nonce

Function get_nonce

django/middleware/csp.py:6–7  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

4
5
6def get_nonce(request):
7 return getattr(request, "_csp_nonce", None)
8
9
10class ContentSecurityPolicyMiddleware(MiddlewareMixin):

Callers 3

cspFunction · 0.90
csp_nonceFunction · 0.90
process_responseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected