mirror of
https://github.com/nextcloud/server.git
synced 2026-05-12 00:19:36 -04:00
fix(ObjectStore): handle empty S3 hostname
Fixes #45637 The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated). Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
parent
21bc68f55a
commit
3fde98d71c
1 changed files with 1 additions and 1 deletions
|
|
@ -95,8 +95,8 @@ trait S3ConnectionTrait {
|
|||
$this->copySizeLimit = $params['copySizeLimit'] ?? 5242880000;
|
||||
$this->useMultipartCopy = (bool)($params['useMultipartCopy'] ?? true);
|
||||
$params['region'] = empty($params['region']) ? 'eu-west-1' : $params['region'];
|
||||
$params['s3-accelerate'] = $params['hostname'] == 's3-accelerate.amazonaws.com' || $params['hostname'] == 's3-accelerate.dualstack.amazonaws.com';
|
||||
$params['hostname'] = empty($params['hostname']) ? 's3.' . $params['region'] . '.amazonaws.com' : $params['hostname'];
|
||||
$params['s3-accelerate'] = $params['hostname'] === 's3-accelerate.amazonaws.com' || $params['hostname'] === 's3-accelerate.dualstack.amazonaws.com';
|
||||
if (!isset($params['port']) || $params['port'] === '') {
|
||||
$params['port'] = (isset($params['use_ssl']) && $params['use_ssl'] === false) ? 80 : 443;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue