aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMaxime Besson <maxime.besson@worteks.com>2021-04-08 18:00:12 +0200
committerMaxime Besson <maxime.besson@worteks.com>2021-04-09 10:15:57 +0200
commit547438527d5184f786117a21f65ca51b95ee695c (patch)
treea7af2f10727e4441d5906b8215121b187ea2e458 /lib
parent03fe74b95e23df70d3cd4815a84b6fa22a06ee81 (diff)
downloadnextcloud-server-547438527d5184f786117a21f65ca51b95ee695c.tar.gz
nextcloud-server-547438527d5184f786117a21f65ca51b95ee695c.zip
fix(proxy): reaching s3 storage behind some http proxy
Signed-off-by: Maxime Besson <maxime.besson@worteks.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/ObjectStore/S3ObjectTrait.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php
index 3f9d86f8e2b..9e23997d6df 100644
--- a/lib/private/Files/ObjectStore/S3ObjectTrait.php
+++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php
@@ -51,8 +51,7 @@ trait S3ObjectTrait {
*/
public function readObject($urn) {
return SeekableHttpStream::open(function ($range) use ($urn) {
- $connection = $this->getConnection();
- $command = $connection->getCommand('GetObject', [
+ $command = $this->getConnection()->getCommand('GetObject', [
'Bucket' => $this->bucket,
'Key' => $urn,
'Range' => 'bytes=' . $range,
@@ -71,8 +70,9 @@ trait S3ObjectTrait {
],
];
- if ($connection->getProxy()) {
- $opts['http']['proxy'] = $connection->getProxy();
+ if ($this->getProxy()) {
+ $opts['http']['proxy'] = $this->getProxy();
+ $opts['http']['request_fulluri'] = true;
}
$context = stream_context_create($opts);