}
/**
- * 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);
}
{
config()->set([
'app.iframe_sources' => 'https://example.com',
- 'services.drawio' => 'https://diagrams.example.com/testing?cat=dog',
+ 'services.drawio' => 'https://diagrams.example.com/testing?cat=dog',
]);
$resp = $this->get('/');