Skip to content

Commit a65e3b0

Browse files
authored
All: add CSP exceptions for wordpress admins
- when the blogs are switched to use this repo's jquery theme, the theme will need to allow for data: images and fonts Ref jquery/blog.jquery.com-theme#12 Closes gh-477
1 parent 31f2f08 commit a65e3b0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

themes/jquery/functions.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,12 @@ function jq_content_security_policy() {
264264
// The nonce is here so inline scripts can be used in the theme
265265
'style-src' => "'self' 'nonce-$nonce' code.jquery.com",
266266
// data: SVG images are used in typesense
267-
'img-src' => "'self' data: code.jquery.com",
267+
// Allow gravatars in wordpress admins
268+
'img-src' => "'self' data: secure.gravatar.com code.jquery.com",
268269
'connect-src' => "'self' typesense.jquery.com",
269-
'font-src' => "'self'",
270+
// Allow data fonts for the wordpress admins
271+
'font-src' => "'self' data:",
270272
'object-src' => "'none'",
271-
'media-src' => "'self'",
272-
'frame-src' => "'self'",
273-
'child-src' => "'self'",
274-
'form-action' => "'self'",
275273
'frame-ancestors' => "'none'",
276274
'base-uri' => "'self'",
277275
'block-all-mixed-content' => '',

0 commit comments

Comments
 (0)