Skip to content

Commit

Permalink
jqueryui.com: add CSP exceptions for themeroller
Browse files Browse the repository at this point in the history
  • Loading branch information
timmywil committed Dec 15, 2024
1 parent 1a47589 commit 0f7a2ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions themes/jqueryui.com/functions.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php

require_once __DIR__ . '/functions.content.php';

// Allow inline scripts on https://jqueryui.com/themeroller/
// Load styles from download.jqueryui.com on https://jqueryui.com/themeroller/
// Load images from download.jqueryui.com on https://jqueryui.com/themeroller/
add_filter( 'jq_content_security_policy', function ( $policy ) {
$policy[ 'style-src' ] = "'self' 'unsafe-inline' code.jquery.com download.jqueryui.com";
$policy[ 'img-src' ] = "'self' data: code.jquery.com download.jqueryui.com";
return $policy;
} );

0 comments on commit 0f7a2ba

Please sign in to comment.