We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 318cea7 commit 92228a4Copy full SHA for 92228a4
themes/jquery/functions.php
@@ -256,6 +256,9 @@ function jq_image_posted_on() {
256
* Content Security Policy
257
*/
258
function jq_content_security_policy() {
259
+ if ( !JQUERY_STAGING ) {
260
+ return;
261
+ }
262
$nonce = bin2hex( random_bytes( 8 ) );
263
$policy = array(
264
'default-src' => "'self'",
@@ -284,7 +287,7 @@ function jq_content_security_policy() {
284
287
$policy_string .= $key . ' ' . $value . '; ';
285
288
}
286
289
- header( 'Content-Security-Policy: ' . $policy_string );
290
+ header( 'Content-Security-Policy-Report-Only: ' . $policy_string );
291
292
293
add_action( 'send_headers', 'jq_content_security_policy' );
0 commit comments