-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcsp.config.js
68 lines (67 loc) · 1.7 KB
/
csp.config.js
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
export const csp = (dev, rootDomain) => {
return {
'base-uri': ['self'],
'child-src': ['self'],
'connect-src': dev
? ['self', 'ws://localhost:*', 'ws://*', 'blob://*', '*']
: [
'self',
'ws://localhost:*',
'https://*.prismic.io',
'https://*.googlevideo.com',
'wss://*.peerjs.com',
'ws://*.peerjs.com',
'https://plausible.speedynetz.de'
],
// 'connect-src': ,
'img-src': [
'self',
'data:',
'blob:',
'https://picsum.photos',
'https://*.picsum.photos',
'https://*.prismic.io',
'https://*.ytimg.com',
'https://*.googleusercontent.com',
'https://*.ggpht.com',
'https://www.gstatic.com/'
],
'font-src': ['self', 'data:'],
'form-action': ['self'],
'frame-ancestors': ['self'],
'frame-src': ['self', 'https://*.prismic.io'],
'manifest-src': ['self'],
'media-src': [
'self',
'data:',
'blob://*',
'blob:*',
'ws://localhost:*',
'localhost:*',
'https://*.prismic.io',
'https://*.googlevideo.com'
],
'object-src': ['none'],
'style-src': ['self', 'unsafe-inline'],
'default-src': [
'self',
`${rootDomain}`,
`ws://${rootDomain}`,
'localhost:*',
'https://*.googlevideo.com/',
'https://static.cloudflareinsights.com'
],
'script-src': [
'self',
'localhost:*',
'sha256-jJRyFHbyYyWq0qnPRIobBCZON4vc+P5RXzYgJ5fHVTg=',
'report-sample',
'https://prismic.io',
'https://*.prismic.io',
'https://static.cloudflareinsights.com',
'https://plausible.io',
'https://plausible.speedynetz.de'
],
'worker-src': ['self']
}
}