Skip to content

Commit 5df1144

Browse files
authored
All: add CSP exceptions for loading klavika font from typekit
Ref jquery/infrastructure-puppet#54 Closes gh-9
1 parent 80715f1 commit 5df1144

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

jquery/functions.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,14 @@ function twentyeleven_content_security_policy() {
289289
$report_url = 'https://csp-report-api.openjs-foundation.workers.dev/';
290290
$policy = array(
291291
'default-src' => "'self'",
292-
'script-src' => "'self' code.jquery.com",
293-
'style-src' => "'self' code.jquery.com",
292+
// Allow scripts and inline scripts for typekit
293+
'script-src' => "'self' 'unsafe-inline' code.jquery.com use.typekit.net",
294+
// Allow inline styles for typekit
295+
'style-src' => "'self' 'unsafe-inline' code.jquery.com",
296+
// Leaving out typekit img-src, which only loads the p.gif for analytics
294297
'img-src' => "'self' code.jquery.com",
298+
// Allow fonts from typekit
299+
'font-src' => "'self' use.typekit.net",
295300
'object-src' => "'none'",
296301
'frame-ancestors' => "'none'",
297302
'block-all-mixed-content' => '',

0 commit comments

Comments
 (0)