Skip to content

Commit cc5c2d8

Browse files
committed
Add a protocol by default on config endpoint
1 parent b487d4a commit cc5c2d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Kitar/Dynamodb/Connection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ protected function createClient(array $config)
7979
'endpoint' => $config['endpoint'] ?? null,
8080
];
8181

82+
if(preg_match('#^https?://#i', $dynamoConfig['endpoint']) === 0){
83+
$dynamoConfig['endpoint'] = "https://" . $dynamoConfig['endpoint'];
84+
}
85+
8286
if ($key = $config['access_key'] ?? null) {
8387
$config['key'] = $key;
8488
unset($config['access_key']);

0 commit comments

Comments
 (0)