mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-09-17 01:45:27 +02:00
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:
@@ -1866,6 +1866,9 @@ func doValidateCdRemoteConfig(cdUID string, fatal bool) error {
|
|||||||
} else {
|
} else {
|
||||||
mainLog.Load().Error().Msgf("failed to unmarshal custom config: %v", err)
|
mainLog.Load().Error().Msgf("failed to unmarshal custom config: %v", err)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
setListenerDefaultValue(remoteCfg)
|
||||||
|
setNetworkDefaultValue(remoteCfg)
|
||||||
}
|
}
|
||||||
cfgErr = validateConfig(remoteCfg)
|
cfgErr = validateConfig(remoteCfg)
|
||||||
if cfgErr != nil {
|
if cfgErr != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user