mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-02-09 09:17:28 +08:00
support env variables to overwrite toml file
This commit is contained in:
@@ -22,7 +22,7 @@ func LoadServerTLS(config *viper.Viper, component string) grpc.ServerOption {
|
||||
glog.Errorf("load cert/key error: %v", err)
|
||||
return nil
|
||||
}
|
||||
caCert, err := ioutil.ReadFile(config.GetString("ca"))
|
||||
caCert, err := ioutil.ReadFile(config.GetString(component + ".ca"))
|
||||
if err != nil {
|
||||
glog.Errorf("read ca cert file error: %v", err)
|
||||
return nil
|
||||
@@ -49,7 +49,7 @@ func LoadClientTLS(config *viper.Viper, component string) grpc.DialOption {
|
||||
glog.Errorf("load cert/key error: %v", err)
|
||||
return grpc.WithInsecure()
|
||||
}
|
||||
caCert, err := ioutil.ReadFile(config.GetString("ca"))
|
||||
caCert, err := ioutil.ReadFile(config.GetString(component + ".ca"))
|
||||
if err != nil {
|
||||
glog.Errorf("read ca cert file error: %v", err)
|
||||
return grpc.WithInsecure()
|
||||
|
||||
Reference in New Issue
Block a user