mirror of
https://github.com/twofas/2fas-server.git
synced 2024-12-04 16:20:13 +01:00
use shared config state
This commit is contained in:
parent
ce476fe477
commit
a0ebcb236a
@ -29,11 +29,15 @@ func NewServer(cfg config.PassConfig) *Server {
|
||||
if region == "" {
|
||||
region = "us-east-1"
|
||||
}
|
||||
sess, err := session.NewSession(&aws.Config{
|
||||
Region: aws.String(region),
|
||||
S3ForcePathStyle: aws.Bool(true),
|
||||
Endpoint: awsEndpoint,
|
||||
})
|
||||
sess, err := session.NewSessionWithOptions(
|
||||
session.Options{
|
||||
Config: aws.Config{
|
||||
Region: aws.String(region),
|
||||
S3ForcePathStyle: aws.Bool(true),
|
||||
Endpoint: awsEndpoint,
|
||||
},
|
||||
SharedConfigState: session.SharedConfigEnable,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user