diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 582c72aa..9656e6af 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -27,12 +27,14 @@ namespace OCA\Files_PDFViewer\AppInfo; +use OCA\Files_PDFViewer\Listeners\CSPListener; use OCA\Files_PDFViewer\Listeners\LoadViewerListener; use OCA\Viewer\Event\LoadViewer; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; +use OCP\Security\CSP\AddContentSecurityPolicyEvent; use OCP\Util; class Application extends App implements IBootstrap { @@ -44,6 +46,7 @@ public function __construct() { public function register(IRegistrationContext $context): void { $context->registerEventListener(LoadViewer::class, LoadViewerListener::class); + $context->registerEventListener(AddContentSecurityPolicyEvent::class, CSPListener::class); } public function boot(IBootContext $context): void {