Skip to content

Commit

Permalink
Set optional endpoint if region is set
Browse files Browse the repository at this point in the history
  • Loading branch information
miguilimzero committed Aug 28, 2023
1 parent a22f2e8 commit 03935c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SinglestoreBackup.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ protected function executeExternalStorageQuery(): array

protected function getExternalStorageParameters(): array
{
$config = [
'endpoint_url' => $this->endpoint,
];
$config = [];

$credentials = match($this->driver) {
's3' => [
Expand All @@ -117,6 +115,8 @@ protected function getExternalStorageParameters(): array

if ($this->driver === 's3' && $this->region) {
$config['region'] = $this->region;
} else {
$config['endpoint_url'] = $this->endpoint;
}

return [
Expand Down

0 comments on commit 03935c8

Please sign in to comment.