Skip to content

Commit 4249546

Browse files
authored
feat(csp): allow shared assets (#10858)
Allow assers from https://mdn.github.io/shared-assets/ managed via GitHub pages in https://github.com/mdn/shared-assets
1 parent fd8cb95 commit 4249546

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: libs/constants/index.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,24 @@ export const CSP_DIRECTIVES = {
152152
"wikipedia.org",
153153
"upload.wikimedia.org",
154154

155+
// Shared assets.
156+
"https://mdn.github.io/shared-assets/",
157+
155158
// GA4.
156159
"https://*.google-analytics.com",
157160
"https://*.googletagmanager.com",
158161

159162
"www.gstatic.com",
160163
],
161164
"manifest-src": ["'self'"],
162-
"media-src": ["'self'", "archive.org", "videos.cdn.mozilla.net"],
165+
"media-src": [
166+
"'self'",
167+
"archive.org",
168+
"videos.cdn.mozilla.net",
169+
170+
// Shared assets.
171+
"https://mdn.github.io/shared-assets/",
172+
],
163173
"child-src": ["'self'"],
164174
"worker-src": ["'self'"],
165175
};

0 commit comments

Comments
 (0)