mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 15:29:24 +08:00
s3: use static configuration by default
So that users can still use the previous configuration files. If leave it empty, s3 will try to use the version from filer
This commit is contained in:
@@ -38,13 +38,14 @@ func NewIdentityAccessManagement(option *S3ApiServerOption) *IdentityAccessManag
|
||||
iam := &IdentityAccessManagement{
|
||||
domain: option.DomainName,
|
||||
}
|
||||
if err := iam.loadS3ApiConfigurationFromFiler(option); err != nil {
|
||||
glog.Warningf("fail to load config: %v", err)
|
||||
}
|
||||
if len(iam.identities) == 0 && option.Config != "" {
|
||||
if option.Config != "" {
|
||||
if err := iam.loadS3ApiConfigurationFromFile(option.Config); err != nil {
|
||||
glog.Fatalf("fail to load config file %s: %v", option.Config, err)
|
||||
}
|
||||
} else {
|
||||
if err := iam.loadS3ApiConfigurationFromFiler(option); err != nil {
|
||||
glog.Warningf("fail to load config: %v", err)
|
||||
}
|
||||
}
|
||||
return iam
|
||||
}
|
||||
|
Reference in New Issue
Block a user