config: add some validations (#3610)

This commit is contained in:
fatedier
2023-09-13 18:59:51 +08:00
committed by GitHub
parent 7cd02f5bd8
commit 74255f711e
9 changed files with 144 additions and 20 deletions

View File

@@ -39,7 +39,7 @@ func validateProxyBaseConfigForClient(c *v1.ProxyBaseConfig) error {
}
if c.Plugin.Type == "" {
if err := ValidatePort(c.LocalPort); err != nil {
if err := ValidatePort(c.LocalPort, "localPort"); err != nil {
return fmt.Errorf("localPort: %v", err)
}
}