mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-04-02 15:33:36 +03:00
filtering: imp tests
This commit is contained in:
parent
1f2ba07eae
commit
b34a8c169c
2 changed files with 3 additions and 3 deletions
|
@ -27,8 +27,8 @@ func (d *DNSFilter) processDNSRewrites(dnsr []*rules.NetworkRule) (res Result) {
|
||||||
|
|
||||||
slices.SortFunc(dnsr, rewriteSortsBefore)
|
slices.SortFunc(dnsr, rewriteSortsBefore)
|
||||||
|
|
||||||
for _, nr := range dnsr {
|
for i, nr := range dnsr {
|
||||||
if containsWildcard(nr) {
|
if i > 0 && containsWildcard(nr) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ func TestDNSFilter_CheckHostRules_dnsrewrite(t *testing.T) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDNSFilter_processDNSRewrites(t *testing.T) {
|
func TestDNSFilter_ProcessDNSRewrites(t *testing.T) {
|
||||||
const text = `
|
const text = `
|
||||||
|www.example.com^$dnsrewrite=127.0.0.1
|
|www.example.com^$dnsrewrite=127.0.0.1
|
||||||
|*.example.com^$dnsrewrite=127.0.0.2
|
|*.example.com^$dnsrewrite=127.0.0.2
|
||||||
|
|
Loading…
Add table
Reference in a new issue