Skip to content

Commit c192deb

Browse files
committed
debugging config load issues
1 parent 270fed1 commit c192deb

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

utils/config/loader.go

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ var ENV *ENV_ = &ENV_{
3939
TOKENS_DIR: os.Getenv("TOKENS_DIR"),
4040
API_TOKENS: []string{},
4141
SETTINGS: map[string]*SETTING_{
42-
"*": {
43-
BLOCKED_ENDPOINTS: []string{},
44-
ALLOWED_ENDPOINTS: []string{},
45-
MESSAGE_ALIASES: []middlewareTypes.MessageAlias{},
46-
VARIABLES: map[string]any{},
47-
},
42+
4843
},
4944
INSECURE: false,
5045
}
@@ -80,14 +75,16 @@ func InitEnv() {
8075

8176
ENV.API_URL = config.String("api.url")
8277

78+
var settings SETTING_
79+
8380
transformChildren(config, "variables", func(key string, value any) (string, any) {
8481
return strings.ToUpper(key), value
8582
})
8683

87-
var settings SETTING_
88-
8984
config.Unmarshal("settings", &settings)
9085

86+
log.Dev(jsonutils.ToJson(settings))
87+
9188
ENV.SETTINGS["*"] = &settings
9289
}
9390

0 commit comments

Comments
 (0)