Skip to content

Commit

Permalink
fix PHPCS
Browse files Browse the repository at this point in the history
  • Loading branch information
asadowski10 committed Nov 7, 2024
1 parent b9e04bf commit 5704d63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
"config": {
"optimize-autoloader": true,
"preferred-install": { "*": "dist" },
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"phpro/grumphp-shim": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "v0.7.1",
Expand Down
8 changes: 3 additions & 5 deletions default-http-headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ function wp_headers( array $headers ): array {
$csp_header = defined( 'CSP_REPORT_ONLY' ) && CSP_REPORT_ONLY ? 'Content-Security-Policy-Report-Only' : 'Content-Security-Policy';
$csp_headers_array[ $csp_header ] = get_prepare_csp( $csp );


$custom_headers_array = [];

/**$custom_headers_array = [
Expand Down Expand Up @@ -124,10 +123,9 @@ function get_csp_headers(): array {
'object-src' => '\'none\'',
];

if ( 'production' === WP_ENV ) {
//if ( 'production' === WP_ENV ) {
//$csp = [];
}

//}

return apply_filters( 'csp_headers', $csp );
}
}

0 comments on commit 5704d63

Please sign in to comment.