From c691fd4a9dc5ca412ec13104b60d8334cdbe5963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 25 May 2020 12:42:15 +0200 Subject: [PATCH] Allow connecting to local addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .drone.yml | 1 - lib/Service/CapabilitiesService.php | 2 +- lib/WOPI/DiscoveryManager.php | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 370437278..730d830c0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -94,7 +94,6 @@ steps: - bash ./tests/drone-server-setup.sh $APP_NAME $CORE_BRANCH $DB - cd ../server - ./occ app:enable $APP_NAME - - ./occ config:system:set allow_local_remote_servers --value 1 - cd apps/$APP_NAME # Run integration tests diff --git a/lib/Service/CapabilitiesService.php b/lib/Service/CapabilitiesService.php index 104936669..ed0998b37 100644 --- a/lib/Service/CapabilitiesService.php +++ b/lib/Service/CapabilitiesService.php @@ -112,7 +112,7 @@ class CapabilitiesService { $capabilitiesEndpoint = $remoteHost . '/hosting/capabilities'; $client = $this->clientService->newClient(); - $options = ['timeout' => 10]; + $options = ['timeout' => 10, 'nextcloud' => ['allow_local_address' => true]]; $options['verify'] = $this->config->getAppValue('richdocuments', 'disable_certificate_verification', '') === ''; diff --git a/lib/WOPI/DiscoveryManager.php b/lib/WOPI/DiscoveryManager.php index 814d39174..18af86085 100644 --- a/lib/WOPI/DiscoveryManager.php +++ b/lib/WOPI/DiscoveryManager.php @@ -96,7 +96,7 @@ class DiscoveryManager { $wopiDiscovery = $remoteHost . '/hosting/discovery'; $client = $this->clientService->newClient(); - $options = ['timeout' => 5]; + $options = ['timeout' => 5, 'nextcloud' => ['allow_local_address' => true]]; $options['verify'] = $this->config->getAppValue('richdocuments', 'disable_certificate_verification', '') === '';