Skip to content

Commit

Permalink
Add "Content-Security-Policy: frame-ancestors 'self'" to all view hea…
Browse files Browse the repository at this point in the history
…ders (CO-2705) (#580)

Co-authored-by: Arlen Johnson <[email protected]>
  • Loading branch information
spartanicus and Arlen Johnson authored Mar 1, 2024
1 parent 39f988d commit 3aeb1cb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/View/Layouts/default.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
header("Expires: Thursday, 10-Jan-69 00:00:00 GMT");
header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
header("Pragma: no-cache");
header("Content-Security-Policy: frame-ancestors 'self'");

// Add X-UA-Compatible header for IE
if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) {
Expand Down
3 changes: 2 additions & 1 deletion app/View/Layouts/error.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/


header("Content-Security-Policy: frame-ancestors 'self'");
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
?>
<!DOCTYPE html>
Expand Down
1 change: 1 addition & 0 deletions app/View/Layouts/lightbox.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
header("Expires: Thursday, 10-Jan-69 00:00:00 GMT");
header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
header("Pragma: no-cache");
header("Content-Security-Policy: frame-ancestors 'self'");
?>
<!DOCTYPE html>
<html>
Expand Down
1 change: 1 addition & 0 deletions app/View/Layouts/redirect.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
header("Expires: Thursday, 10-Jan-69 00:00:00 GMT");
header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
header("Pragma: no-cache");
header("Content-Security-Policy: frame-ancestors 'self'");

// Add X-UA-Compatible header for IE
if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) {
Expand Down

0 comments on commit 3aeb1cb

Please sign in to comment.