diff --git a/liquet/functions.php b/liquet/functions.php index b9421b1..c1cf904 100644 --- a/liquet/functions.php +++ b/liquet/functions.php @@ -6,6 +6,17 @@ add_theme_support( 'align-wide' ); add_theme_support( 'title-tag' ); add_theme_support( 'post-thumbnails' ); + +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:; report-uri csp@nicco.io"; + $headers['X-Content-Type-Options'] = 'nosniff'; + $headers['X-Frame-Options'] = "deny"; + $headers['Strict-Transport-Security'] = "max-age=31536000"; + $headers['Referrer-Policy'] = "origin"; + + return $headers; +} ); + add_action( 'wp_enqueue_scripts', function () { // JS wp_enqueue_script( 'liquet-lights', get_template_directory_uri() . '/js/lights.js' );