Skip to content

Commit 9bca87c

Browse files
committed
fix: remove suffix /index.php from exapp url
Signed-off-by: Anupam Kumar <[email protected]>
1 parent 058dd67 commit 9bca87c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/DeployActions/DockerActions.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -805,11 +805,11 @@ public function resolveExAppUrl(
805805
string $appId, string $protocol, string $host, array $deployConfig, int $port, array &$auth
806806
): string {
807807
if (boolval($deployConfig['harp'] ?? false)) {
808-
return sprintf(
809-
'%s/exapps/%s',
810-
rtrim(rtrim($deployConfig['nextcloud_url'], '/'), '/index.php'),
811-
$appId,
812-
);
808+
$url = rtrim($deployConfig['nextcloud_url'], '/');
809+
if (str_ends_with($url, '/index.php')) {
810+
$url = substr($url, 0, -10);
811+
}
812+
return sprintf('%s/exapps/%s', $url, $appId);
813813
}
814814

815815
$auth = [];

0 commit comments

Comments
 (0)