cmd/cli: fix validating remote custom config

Currently, custom config is only validated against invalid syntax, not
the validating rules for each configuration value. It causes ctrld
process fatal instead of disregarding as expected.

To fix this, force the validating rule after fetching remote config.
While at it, also add the default network value if non-existed.
This commit is contained in:
Cuong Manh Le
2025-02-28 14:27:53 +07:00
committed by Cuong Manh Le
parent e578867118
commit 020b814402
2 changed files with 32 additions and 11 deletions
+1
View File
@@ -359,6 +359,7 @@ func (p *prog) apiConfigReload() {
return
}
setListenerDefaultValue(cfg)
setNetworkDefaultValue(cfg)
logger.Debug().Msg("custom config changes detected, reloading...")
p.apiReloadCh <- cfg
} else {