mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
fix(proxy): reaching s3 storage behind some http proxy
Signed-off-by: Maxime Besson <maxime.besson@worteks.com>
This commit is contained in:
parent
4c9e7e2d39
commit
956bccc1c0
1 changed files with 4 additions and 4 deletions
|
|
@ -50,8 +50,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,
|
||||
|
|
@ -70,8 +69,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue