mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
fix(OCM): Fix OCM provider discovery for servers without beautiful URLs
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
82f23fbfe1
commit
4424918313
1 changed files with 4 additions and 1 deletions
|
|
@ -69,6 +69,9 @@ class OCMDiscoveryService implements IOCMDiscoveryService {
|
|||
*/
|
||||
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 @@ class OCMDiscoveryService implements IOCMDiscoveryService {
|
|||
$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'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue