Skip to content

Commit 293d811

Browse files
authored
IamAwsProvider: fix custom endpoint having non-default port (#1523)
1 parent a0dea73 commit 293d811

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

api/src/main/java/io/minio/credentials/IamAwsProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ private String fetchImdsToken() {
140140
new HttpUrl.Builder()
141141
.scheme(url.scheme())
142142
.host(url.host())
143+
.port(url.port())
143144
.addPathSegments("latest/api/token")
144145
.build();
145146
}
@@ -188,6 +189,7 @@ private HttpUrl getIamRoleNamedUrl(String token) {
188189
new HttpUrl.Builder()
189190
.scheme(url.scheme())
190191
.host(url.host())
192+
.port(url.port())
191193
.addPathSegments("latest/meta-data/iam/security-credentials/")
192194
.build();
193195
}

0 commit comments

Comments
 (0)