Pull request: dnsforward: preserve domain name case
Updates #3194. Squashed commit of the following: commit 42a363c56b9b7441f9dc4bfc9d881b1b1e8f6b57 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon May 31 15:15:59 2021 +0300 dnsforward: preserve domain name case
This commit is contained in:
@@ -129,10 +129,12 @@ func (a *accessCtx) IsBlockedIP(ip net.IP) (bool, string) {
|
||||
}
|
||||
|
||||
// IsBlockedDomain - return TRUE if this domain should be blocked
|
||||
func (a *accessCtx) IsBlockedDomain(host string) bool {
|
||||
func (a *accessCtx) IsBlockedDomain(host string) (ok bool) {
|
||||
a.lock.Lock()
|
||||
_, ok := a.blockedHostsEngine.Match(host)
|
||||
a.lock.Unlock()
|
||||
defer a.lock.Unlock()
|
||||
|
||||
_, ok = a.blockedHostsEngine.Match(strings.ToLower(host))
|
||||
|
||||
return ok
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user