diff --git a/lib/private/OCM/OCMDiscoveryService.php b/lib/private/OCM/OCMDiscoveryService.php index ac9bf2a3965c6..51db989042350 100644 --- a/lib/private/OCM/OCMDiscoveryService.php +++ b/lib/private/OCM/OCMDiscoveryService.php @@ -69,6 +69,9 @@ public function __construct( */ public function discover(string $remote, bool $skipCache = false): IOCMProvider { $remote = rtrim($remote, '/'); + if (str_ends_with($remote, '/index.php')) { + $remote = substr($remote, 0, -10); + } if (!$skipCache) { try { @@ -84,7 +87,7 @@ public function discover(string $remote, bool $skipCache = false): IOCMProvider $client = $this->clientService->newClient(); try { $response = $client->get( - $remote . '/ocm-provider/', + $remote . '/index.php/ocm-provider/', [ 'timeout' => 10, 'verify' => !$this->config->getSystemValueBool('sharing.federation.allowSelfSignedCertificates'),