Adding else per pr comments
Signed-off-by: James Strong <james.strong@chainguard.dev>
This commit is contained in:
parent
fe762d4bae
commit
6eb1ffffdf
1 changed files with 6 additions and 4 deletions
|
@ -295,10 +295,12 @@ func checkPath(paths []networkingv1.HTTPIngressPath, enablePathTypeValidation bo
|
||||||
return fmt.Errorf("path %s of type %s contains invalid characters", path.Path, *path.PathType)
|
return fmt.Errorf("path %s of type %s contains invalid characters", path.Path, *path.PathType)
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
} else {
|
||||||
//path validation is disabled, so we check what regex chars are allowed by user
|
//path validation is disabled, so we check what regex chars are allowed by user
|
||||||
if !regexSpecificChars.MatchString(path.Path) {
|
if !regexSpecificChars.MatchString(path.Path) {
|
||||||
return fmt.Errorf("path %s of type %s contains invalid characters", path.Path, *path.PathType)
|
return fmt.Errorf("path %s of type %s contains invalid characters", path.Path, *path.PathType)
|
||||||
|
}
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue