diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-03-08 14:29:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-08 14:29:59 +0300 |
commit | 7ab36ce3153f046fd0263d086897a53ba5bd14fc (patch) | |
tree | 86481bd138f740455cc6eb3deede51bc9ee1e02c /lib | |
parent | b494093c4f51d5fb6f823bb8afe92313ab0eb5b1 (diff) | |
parent | 32e238f2e6b6cda34eff6b262e9bc6a8646c13c3 (diff) |
Merge pull request #1412 from nextcloud/bugfix/1395
Trim duplicate trailing slashes in wopi url
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/CapabilitiesService.php | 2 | ||||
-rw-r--r-- | lib/WOPI/DiscoveryManager.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Service/CapabilitiesService.php b/lib/Service/CapabilitiesService.php index 9d6583b0..981b3640 100644 --- a/lib/Service/CapabilitiesService.php +++ b/lib/Service/CapabilitiesService.php @@ -89,7 +89,7 @@ class CapabilitiesService { if ($remoteHost === '') { return []; } - $capabilitiesEndpoint = $remoteHost . '/hosting/capabilities'; + $capabilitiesEndpoint = rtrim($remoteHost, '/') . '/hosting/capabilities'; $client = $this->clientService->newClient(); $options = ['timeout' => 45, 'nextcloud' => ['allow_local_address' => true]]; diff --git a/lib/WOPI/DiscoveryManager.php b/lib/WOPI/DiscoveryManager.php index d8d70b58..bcc103d8 100644 --- a/lib/WOPI/DiscoveryManager.php +++ b/lib/WOPI/DiscoveryManager.php @@ -68,7 +68,7 @@ class DiscoveryManager { */ public function fetchFromRemote() { $remoteHost = $this->config->getAppValue('richdocuments', 'wopi_url'); - $wopiDiscovery = $remoteHost . '/hosting/discovery'; + $wopiDiscovery = rtrim($remoteHost, '/') . '/hosting/discovery'; $client = $this->clientService->newClient(); $options = ['timeout' => 45, 'nextcloud' => ['allow_local_address' => true]]; |