add domain rule "root or sub"

This commit is contained in:
Frand Ren
2023-09-12 03:43:11 +08:00
committed by Nick Peng
parent 1ff7829b49
commit 1a492f7dc0
2 changed files with 13 additions and 7 deletions

View File

@@ -917,6 +917,10 @@ static int _config_domain_rule_add(const char *domain, enum domain_rule type, vo
len--;
if (domain[1] == '.') {
sub_rule_only = 1;
} else if ((domain[1] == '-') && (domain[2] == '.')) {
len--;
sub_rule_only = 1;
root_rule_only = 1;
}
} else if (domain[0] == '-') {
/* root match only */