aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/ObjectStore/S3ConnectionTrait.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/ObjectStore/S3ConnectionTrait.php')
-rw-r--r--lib/private/Files/ObjectStore/S3ConnectionTrait.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php
index d88ef0ac8e7..6fd6b14aabe 100644
--- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php
+++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php
@@ -57,6 +57,9 @@ trait S3ConnectionTrait {
/** @var int */
protected $timeout;
+ /** @var string */
+ protected $proxy;
+
/** @var int */
protected $uploadPartSize;
@@ -71,6 +74,7 @@ trait S3ConnectionTrait {
$this->test = isset($params['test']);
$this->bucket = $params['bucket'];
+ $this->proxy = isset($params['proxy']) ? $params['proxy'] : false;
$this->timeout = !isset($params['timeout']) ? 15 : $params['timeout'];
$this->uploadPartSize = !isset($params['uploadPartSize']) ? 524288000 : $params['uploadPartSize'];
$params['region'] = empty($params['region']) ? 'eu-west-1' : $params['region'];
@@ -86,6 +90,10 @@ trait S3ConnectionTrait {
return $this->bucket;
}
+ public function getProxy() {
+ return $this->proxy;
+ }
+
/**
* Returns the connection
*
@@ -123,7 +131,7 @@ trait S3ConnectionTrait {
'csm' => false,
];
if (isset($this->params['proxy'])) {
- $options['request.options'] = ['proxy' => $this->params['proxy']];
+ $options['http'] = [ 'proxy' => $this->params['proxy'] ];
}
if (isset($this->params['legacy_auth']) && $this->params['legacy_auth']) {
$options['signature_version'] = 'v2';