Skip to content

Commit

Permalink
IamAwsProvider: fix custom endpoint having non-default port (#1523)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgolda committed Mar 2, 2024
1 parent a0dea73 commit 293d811
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/main/java/io/minio/credentials/IamAwsProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ private String fetchImdsToken() {
new HttpUrl.Builder()
.scheme(url.scheme())
.host(url.host())
.port(url.port())
.addPathSegments("latest/api/token")
.build();
}
Expand Down Expand Up @@ -188,6 +189,7 @@ private HttpUrl getIamRoleNamedUrl(String token) {
new HttpUrl.Builder()
.scheme(url.scheme())
.host(url.host())
.port(url.port())
.addPathSegments("latest/meta-data/iam/security-credentials/")
.build();
}
Expand Down

0 comments on commit 293d811

Please sign in to comment.