add wp.com to csp

This commit is contained in:
cupcakearmy 2020-01-07 14:51:25 +01:00
parent e0277ff7e1
commit 64dad4c4b0

View File

@ -8,7 +8,7 @@ add_theme_support( 'post-thumbnails' );
add_filter( 'wp_headers', function ( $headers ) { add_filter( 'wp_headers', function ( $headers ) {
$headers['Content-Security-Policy'] = "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://s.w.org; report-uri csp@nicco.io"; $headers['Content-Security-Policy'] = "default-src 'self' wp.com; script-src 'self' 'unsafe-inline' wp.com; style-src 'self' 'unsafe-inline' wp.com; img-src 'self' wp.com data: https://s.w.org;";
$headers['X-Content-Type-Options'] = 'nosniff'; $headers['X-Content-Type-Options'] = 'nosniff';
$headers['X-Frame-Options'] = "deny"; $headers['X-Frame-Options'] = "deny";
$headers['Strict-Transport-Security'] = "max-age=31536000"; $headers['Strict-Transport-Security'] = "max-age=31536000";