diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-01-29 09:09:55 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-01-29 09:09:55 -0800 |
| commit | d335f04de6861b571190c13bd7d65e9a0c02f187 (patch) | |
| tree | ad534357d50c4027718a7fe2e60391b6545a7db0 /weed/security/tls.go | |
| parent | 27b94cb65b34c084790f0a1884956702ee51acc2 (diff) | |
| download | seaweedfs-d335f04de6861b571190c13bd7d65e9a0c02f187.tar.xz seaweedfs-d335f04de6861b571190c13bd7d65e9a0c02f187.zip | |
support env variables to overwrite toml file
Diffstat (limited to 'weed/security/tls.go')
| -rw-r--r-- | weed/security/tls.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/security/tls.go b/weed/security/tls.go index e81ba4831..f4f525ede 100644 --- a/weed/security/tls.go +++ b/weed/security/tls.go @@ -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() |
