Upgrade to 3.9.6.1

This commit is contained in:
Bastian Allgeier
2023-07-31 13:04:59 +02:00
parent 544b557c94
commit 035d655ca1
9 changed files with 29 additions and 14 deletions

View File

@@ -278,8 +278,16 @@ class Document
'panelUrl' => $uri->path()->toString(true) . '/',
]);
$frameAncestors = $kirby->option('panel.frameAncestors');
$frameAncestors = match (true) {
$frameAncestors === true => "'self'",
is_array($frameAncestors) => "'self' " . implode(' ', $frameAncestors),
is_string($frameAncestors) => $frameAncestors,
default => "'none'"
};
return new Response($body, 'text/html', $code, [
'Content-Security-Policy' => "frame-ancestors 'none'"
'Content-Security-Policy' => 'frame-ancestors ' . $frameAncestors
]);
}
}