mirror of
https://github.com/gomods/athens
synced 2026-02-03 12:10:32 +00:00
Add relative URI for AWS fargate. (#1337)
* f * r * f * gofmt * ep * Container url * Asd * nit * Update docs * keep old stuff * old is gold * indent * asd
This commit is contained in:
committed by
Aaron Schlesinger
parent
6a42417d5b
commit
16739a1213
@@ -44,7 +44,7 @@ func New(s3Conf *config.S3Config, timeout time.Duration, options ...func(*aws.Co
|
||||
|
||||
if !s3Conf.UseDefaultConfiguration {
|
||||
endpointcreds := []credentials.Provider{
|
||||
endpointcreds.NewProviderClient(*awsConfig, defaults.Handlers(), s3Conf.CredentialsEndpoint),
|
||||
endpointcreds.NewProviderClient(*awsConfig, defaults.Handlers(), endpointFrom(s3Conf.CredentialsEndpoint, s3Conf.AwsContainerCredentialsRelativeURI)),
|
||||
&credentials.StaticProvider{
|
||||
Value: credentials.Value{
|
||||
AccessKeyID: s3Conf.Key,
|
||||
@@ -75,3 +75,7 @@ func New(s3Conf *config.S3Config, timeout time.Duration, options ...func(*aws.Co
|
||||
timeout: timeout,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func endpointFrom(credentialsEndpoint string, relativeURI string) string {
|
||||
return credentialsEndpoint + relativeURI
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user