From 3c53e87df71a5acdd4390e85c10a1f5ce78b4063 Mon Sep 17 00:00:00 2001 From: Alexey Mozzhakov Date: Sat, 23 Jun 2018 19:00:13 +0300 Subject: [PATCH] Fix for domains localhost.* and 127.0.0.1.* --- modules/http_proxy_base.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/http_proxy_base.go b/modules/http_proxy_base.go index 38ba658f..88bd96f6 100644 --- a/modules/http_proxy_base.go +++ b/modules/http_proxy_base.go @@ -97,7 +97,7 @@ func (p *HTTPProxy) doProxy(req *http.Request) bool { } for _, blacklisted := range blacklist { - if strings.HasPrefix(req.Host, blacklisted) { + if req.Host == blacklisted { log.Error("Got request with blacklisted host: %s", req.Host) return false }