]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add proxy support to external storage
authorLukas Reschke <lukas@owncloud.com>
Wed, 24 Feb 2016 18:48:47 +0000 (19:48 +0100)
committerLukas Reschke <lukas@owncloud.com>
Wed, 24 Feb 2016 18:48:47 +0000 (19:48 +0100)
Otherwise debugging issues is a PITA

lib/private/files/storage/dav.php

index a6e77e1b232961bfe5cf084c192a7b3fb1716a1b..5e00a03ebb820ad3b03b8cad2a76e18db4459634 100644 (file)
@@ -136,9 +136,13 @@ class DAV extends Common {
                        'password' => $this->password,
                );
 
+               $proxy = \OC::$server->getConfig()->getSystemValue('proxy', '');
+               if($proxy !== '') {
+                       $settings['proxy'] = $proxy;
+               }
+
                $this->client = new Client($settings);
                $this->client->setThrowExceptions(true);
-
                if ($this->secure === true && $this->certPath) {
                        $this->client->addCurlSetting(CURLOPT_CAINFO, $this->certPath);
                }