Skip to content

Commit 555b946

Browse files
Added Cloudfront Public CDN
1 parent 3260c71 commit 555b946

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/server/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ async function onExpressJsSetup(server) {
140140
'Content-Security-Policy',
141141
"default-src 'self';"
142142
+ " script-src 'report-sample' 'self' 'unsafe-inline' 'unsafe-eval'"
143+
+ ` ${config.CDN.PUBLIC}`
143144
+ ' http://www.google-analytics.com'
144145
+ ' https://43d132d5dbff47c59d9d53ad448f93c2.js.ubembed.com'
145146
+ ' https://assets.ubembed.com'
@@ -153,12 +154,12 @@ async function onExpressJsSetup(server) {
153154
+ " object-src 'none';"
154155
+ " base-uri 'self';"
155156
+ " connect-src 'self'"
156-
+ ` ${config.URL.COMMUNITY_APP}`
157-
+ ` ${config.CDN.PUBLIC}`
158157
+ ` ${config.API.V2}/`
159158
+ ` ${config.API.V3}/`
160159
+ ` ${config.API.V4}/`
161160
+ ` ${config.API.V5}/`
161+
+ ` ${config.CDN.PUBLIC}`
162+
+ ` ${config.URL.COMMUNITY_APP}`
162163
+ ' https://api.segment.io'
163164
+ ' https://cdn.segment.com'
164165
+ ' https://ekr.zdassets.com'
@@ -172,9 +173,9 @@ async function onExpressJsSetup(server) {
172173
+ " frame-src 'self'"
173174
+ ` ${config.URL.AUTH};`
174175
+ " img-src 'self'"
176+
+ ` ${config.CDN.PUBLIC}`
175177
+ ' https://www.facebook.com'
176178
+ ' https://images.ctfassets.net'
177-
+ ' https://d2nl5eqipnb33q.cloudfront.net'
178179
+ ' https://cdn.segment.com'
179180
+ ' https://www.google.com'
180181
+ ' https://topcoder-prod-media.s3.amazonaws.com;'

0 commit comments

Comments
 (0)