cmd/cli: set default value for remote config before validating

Since empty network will now have a default value, we need to set it
after sytax validation, prevent false positive when validating rules.
This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2025-03-01 00:24:55 +07:00
1 parent 020b814402
commit 20e61550c2
1 file changed
+3
+3
View File
@@ -1866,6 +1866,9 @@ func doValidateCdRemoteConfig(cdUID string, fatal bool) error {
} else {
mainLog.Load().Error().Msgf("failed to unmarshal custom config: %v", err)
}
} else {
setListenerDefaultValue(remoteCfg)
setNetworkDefaultValue(remoteCfg)
}
cfgErr = validateConfig(remoteCfg)
if cfgErr != nil {