mirror of
https://github.com/gomods/athens
synced 2026-02-03 12:10:32 +00:00
storage/s3: add custom endpoint url support (#1467)
This commit is contained in:
committed by
Aaron Schlesinger
parent
22a9dfe763
commit
5b194688a0
@@ -59,6 +59,9 @@ func New(s3Conf *config.S3Config, timeout time.Duration, options ...func(*aws.Co
|
||||
|
||||
awsConfig.Credentials = credentials.NewChainCredentials(credProviders)
|
||||
awsConfig.CredentialsChainVerboseErrors = aws.Bool(true)
|
||||
if s3Conf.Endpoint != "" {
|
||||
awsConfig.Endpoint = aws.String(s3Conf.Endpoint)
|
||||
}
|
||||
|
||||
// create a session with creds
|
||||
sess, err := session.NewSession(awsConfig)
|
||||
|
||||
Reference in New Issue
Block a user