Update Connection.php
This commit is contained in:
parent
bfe6b6fb41
commit
af6804828b
@ -105,6 +105,9 @@ class Connection
|
|||||||
$configuration['endpoint'] = sprintf('https://sqs.%s.amazonaws.com', $configuration['region']);
|
$configuration['endpoint'] = sprintf('https://sqs.%s.amazonaws.com', $configuration['region']);
|
||||||
} else {
|
} else {
|
||||||
$configuration['endpoint'] = sprintf('%s://%s%s', ($query['sslmode'] ?? null) === 'disable' ? 'http' : 'https', $parsedUrl['host'], ($parsedUrl['port'] ?? null) ? ':'.$parsedUrl['port'] : '');
|
$configuration['endpoint'] = sprintf('%s://%s%s', ($query['sslmode'] ?? null) === 'disable' ? 'http' : 'https', $parsedUrl['host'], ($parsedUrl['port'] ?? null) ? ':'.$parsedUrl['port'] : '');
|
||||||
|
if (preg_match(';sqs.(.+).amazonaws.com;', $parsedUrl['host'], $matches)) {
|
||||||
|
$configuration['region'] = $matches[1];
|
||||||
|
}
|
||||||
unset($query['sslmode']);
|
unset($query['sslmode']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user