Skip to content

Commit 239b9f3

Browse files
committed
api.jquery.com: add CSP exception for flickr for /jQuery.getJSON
Ref jquery/infrastructure-puppet#54 Closes gh-474
1 parent 13a1ba1 commit 239b9f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

themes/api.jquery.com/functions.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<?php
22

33
// Allow inline scripts and styles in API demos
4+
// Allow flickr script and images on https://api.jquery.com/jQuery.getJSON/
45
add_filter( 'jq_content_security_policy', function ( $policy ) {
5-
$policy[ 'script-src' ] = "'self' 'unsafe-inline' code.jquery.com";
6+
$policy[ 'script-src' ] = "'self' 'unsafe-inline' code.jquery.com api.flickr.com";
67
$policy[ 'style-src' ] = "'self' 'unsafe-inline' code.jquery.com";
8+
$policy[ 'img-src' ] = "'self' data: code.jquery.com live.staticflickr.com";
79
return $policy;
810
} );

0 commit comments

Comments
 (0)