Skip to content

Commit fb908f6

Browse files
committed
allow overriding implicit defaults with the default resolver
License: MIT Signed-off-by: vyzo <[email protected]>
1 parent af6c9ae commit fb908f6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/node/dns.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ func DNSResolver(cfg *config.Config) (*madns.Resolver, error) {
3636
return nil, fmt.Errorf("invalid domain %s; must be FQDN", domain)
3737
}
3838

39+
if url == "" {
40+
// allow overriding of implicit defaults with the default resolver
41+
domains[domain] = struct{}{}
42+
continue
43+
}
44+
3945
rslv, ok := rslvrs[url]
4046
if !ok {
4147
rslv, err = newResolver(url)

0 commit comments

Comments
 (0)