Skip to content

Commit e34ccca

Browse files
authored
Automatic AWS endpoint selection (#1221)
1 parent 022071e commit e34ccca

File tree

2 files changed

+2
-82
lines changed

2 files changed

+2
-82
lines changed

Minio/AWSS3Endpoints.cs

Lines changed: 0 additions & 79 deletions
This file was deleted.

Minio/Helper/RequestUtil.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ internal static Uri MakeTargetURL(string endPoint, bool secure, string bucketNam
5151
{
5252
// For Amazon S3 endpoint, try to fetch location based endpoint.
5353
var host = endPoint;
54-
if (S3utils.IsAmazonEndPoint(endPoint))
55-
// Fetch new host based on the bucket location.
56-
host = AWSS3Endpoints.Endpoint(region);
54+
if (S3utils.IsAmazonEndPoint(endPoint) && !string.IsNullOrEmpty(region))
55+
host = $"s3.{region}.amazonaws.com";
5756

5857
if (!usePathStyle)
5958
{

0 commit comments

Comments
 (0)