mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 16:28:43 -03:30
Introduce a strict Content-Security-Policy
This commit is contained in:
committed by
Jake McDermott
parent
be08e0ce69
commit
3d5f28f790
8
awx/ui/context_processors.py
Normal file
8
awx/ui/context_processors.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import base64
|
||||
import os
|
||||
|
||||
|
||||
def csp(request):
|
||||
return {
|
||||
'csp_nonce': base64.encodebytes(os.urandom(32)).decode().rstrip(),
|
||||
}
|
||||
Reference in New Issue
Block a user