From 5abc6a303470315d80df959b46363d2b6cfe2834 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Wed, 19 Oct 2022 09:01:36 +0200 Subject: [PATCH] Solve Nextcloud Content-Security-Policy issue in debug mode https://github.com/the-djmaze/snappymail/issues/96#issuecomment-1282946881 --- .../nextcloud/snappymail/lib/Controller/PageController.php | 3 +-- .../nextcloud/snappymail/lib/Util/SnappyMailHelper.php | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/nextcloud/snappymail/lib/Controller/PageController.php b/integrations/nextcloud/snappymail/lib/Controller/PageController.php index bbde8cda6e..b78af3b387 100644 --- a/integrations/nextcloud/snappymail/lib/Controller/PageController.php +++ b/integrations/nextcloud/snappymail/lib/Controller/PageController.php @@ -47,8 +47,7 @@ public function index() */ public function appGet() { - SnappyMailHelper::startApp(); - \RainLoop\Service::Handle(); + SnappyMailHelper::startApp(true); exit; } diff --git a/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php b/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php index e868f50d83..c561dc8ef9 100644 --- a/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php +++ b/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php @@ -58,6 +58,7 @@ public static function startApp(bool $handle = false) : void } if ($handle) { + \header_remove('Content-Security-Policy'); \RainLoop\Service::Handle(); exit; }