}
/**
- * Get the CSP headers for the application
+ * Get the CSP headers for the application.
*/
public function getCspHeader(): string
{
{
$iframeHosts = $this->getAllowedIframeHosts();
array_unshift($iframeHosts, "'self'");
+
return 'frame-ancestors ' . implode(' ', $iframeHosts);
}
{
$iframeHosts = $this->getAllowedIframeSources();
array_unshift($iframeHosts, "'self'");
+
return 'frame-src ' . implode(' ', $iframeHosts);
}