config: Expand environment variables in some.config.value.path.file inputs for better secret management
This commit is contained in:
parent
6b225bb0ba
commit
b2ddd2753c
|
|
@ -515,7 +515,7 @@ func GetConfigValueFromFile(configKey string) string {
|
|||
if !strings.HasSuffix(configKey, ".file") {
|
||||
configKey += ".file"
|
||||
}
|
||||
var valuePath = viper.GetString(configKey)
|
||||
var valuePath = os.ExpandEnv(viper.GetString(configKey))
|
||||
if valuePath == "" {
|
||||
return ""
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue