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
2025-02-28 23:43:49 +07:00
committed by Cuong Manh Le
parent 020b814402
commit 20e61550c2

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 {