Adjust prefixes to skip when sanity checking xmlRootPath

Before everything starting with '~' was considered, but the check
should be done only with paths starting with '~*req'.
This commit is contained in:
ionutboangiu
2024-02-23 12:33:33 -05:00
committed by Dan Christian Bogos
parent 7510c07612
commit d0f64a7b54

View File

@@ -844,7 +844,7 @@ func (cfg *CGRConfig) checkConfigSanity() error {
// Find the minimum rule length for dynamic RSRParser within the field value.
minRuleLength := math.MaxInt
for _, parser := range field.Value {
if !strings.HasPrefix(parser.Rules, utils.DynamicDataPrefix) {
if !strings.HasPrefix(parser.Rules, utils.MetaDynReq) {
continue
}
ruleLen := len(strings.Split(parser.Rules, utils.NestingSep))