diff --git a/integrations/nextcloud/snappymail/appinfo/routes.php b/integrations/nextcloud/snappymail/appinfo/routes.php index a502b39e9c..ce0e24721b 100755 --- a/integrations/nextcloud/snappymail/appinfo/routes.php +++ b/integrations/nextcloud/snappymail/appinfo/routes.php @@ -9,12 +9,12 @@ ], [ 'name' => 'page#appGet', - 'url' => '/app/', + 'url' => '/run/', 'verb' => 'GET' ], [ 'name' => 'page#appPost', - 'url' => '/app/', + 'url' => '/run/', 'verb' => 'POST' ], [ diff --git a/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php b/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php index 627b3674a3..081d08ec06 100644 --- a/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php +++ b/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php @@ -86,14 +86,7 @@ public static function startApp(bool $api = false) */ public static function getAppUrl() { - $sRequestUri = \OC::$server->getURLGenerator()->linkToRoute('snappymail.page.appGet'); - if ($sRequestUri) { - return $sRequestUri; - } - $sRequestUri = empty($_SERVER['REQUEST_URI']) ? '': \trim($_SERVER['REQUEST_URI']); - $sRequestUri = \preg_replace('/index.php\/.+$/', 'index.php/', $sRequestUri); - $sRequestUri = $sRequestUri.'apps/snappymail/app/'; - return '/'.\ltrim($sRequestUri, '/\\'); + return \OC::$server->getURLGenerator()->linkToRoute('snappymail.page.appGet'); } /**