-
Notifications
You must be signed in to change notification settings - Fork 1
/
csp.py
37 lines (34 loc) · 880 Bytes
/
csp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
""" Content security policy (CSP) """
SELF = "'self'"
csp = {
"default-src": [SELF],
"style-src": [
SELF,
"https://use.fontawesome.com",
"https://stackpath.bootstrapcdn.com",
"https://cdn.jsdelivr.net",
],
"style-src-elem": [
SELF,
"https://use.fontawesome.com",
"https://stackpath.bootstrapcdn.com",
"https://cdn.jsdelivr.net",
],
"script-src": [
SELF,
"https://code.jquery.com",
"https://cdnjs.cloudflare.com",
"https://stackpath.bootstrapcdn.com",
"https://cdn.jsdelivr.net",
],
"font-src": [
SELF,
"https://use.fontawesome.com",
"https://stackpath.bootstrapcdn.com",
],
"connect-src": [SELF, "https://cdn.jsdelivr.net"],
"frame-src": [SELF],
"frame-ancestors": [SELF],
"img-src": "*",
}
# eof