X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/fd26f54b9954cc2a44d9f5f71e4258decf90558e..refs/pull/3693/head:/app/Util/CspService.php diff --git a/app/Util/CspService.php b/app/Util/CspService.php index ba927c93b..f9ab666ac 100644 --- a/app/Util/CspService.php +++ b/app/Util/CspService.php @@ -22,7 +22,7 @@ class CspService } /** - * Get the CSP headers for the application + * Get the CSP headers for the application. */ public function getCspHeader(): string { @@ -86,6 +86,7 @@ class CspService { $iframeHosts = $this->getAllowedIframeHosts(); array_unshift($iframeHosts, "'self'"); + return 'frame-ancestors ' . implode(' ', $iframeHosts); } @@ -97,6 +98,7 @@ class CspService { $iframeHosts = $this->getAllowedIframeSources(); array_unshift($iframeHosts, "'self'"); + return 'frame-src ' . implode(' ', $iframeHosts); }