security inject appName

This commit is contained in:
mr
2026-02-04 09:38:45 +01:00
parent ef916fe2d9
commit d9f646aac2
2 changed files with 6 additions and 7 deletions

View File

@@ -23,12 +23,11 @@ import (
* The configuration loader will give priority to the local file over the default file
*/
func GetConfLoader() *onion.Onion {
func GetConfLoader(appName string) *onion.Onion {
logger := zerolog.New(os.Stdout).With().Timestamp().Logger()
AppName := GetAppName()
EnvPrefix := "OC_"
defaultConfigFile := "/etc/oc/" + AppName[3:] + ".json"
localConfigFile := "./" + AppName[3:] + ".json"
defaultConfigFile := "/etc/oc/" + appName[3:] + ".json"
localConfigFile := "./" + appName[3:] + ".json"
var configFile string
var o *onion.Onion
l3 := GetEnvVarLayer(EnvPrefix)