Skip to content

Commit

Permalink
allow overriding implicit defaults with the default resolver
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>
  • Loading branch information
vyzo committed Apr 14, 2021
1 parent af6c9ae commit fb908f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/node/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ func DNSResolver(cfg *config.Config) (*madns.Resolver, error) {
return nil, fmt.Errorf("invalid domain %s; must be FQDN", domain)
}

if url == "" {
// allow overriding of implicit defaults with the default resolver
domains[domain] = struct{}{}
continue
}

rslv, ok := rslvrs[url]
if !ok {
rslv, err = newResolver(url)
Expand Down

0 comments on commit fb908f6

Please sign in to comment.