Introduce a strict Content-Security-Policy

This commit is contained in:
Ryan Petrello
2020-12-04 12:39:19 -05:00
committed by Jake McDermott
parent be08e0ce69
commit 3d5f28f790
9 changed files with 18 additions and 9 deletions

View File

@@ -0,0 +1,8 @@
import base64
import os
def csp(request):
return {
'csp_nonce': base64.encodebytes(os.urandom(32)).decode().rstrip(),
}