From 18c74ce6ef4f4cf1b5b048cfb602f69f1ba77807 Mon Sep 17 00:00:00 2001 From: Alexey Mozzhakov Date: Sat, 23 Jun 2018 19:17:16 +0300 Subject: [PATCH] Fix for requests with port specified --- 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 88bd96f6..86816471 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 req.Host == blacklisted { + if strings.Split(req.Host, ":")[0] == blacklisted { log.Error("Got request with blacklisted host: %s", req.Host) return false }