diff --git a/modules/http_proxy_base.go b/modules/http_proxy_base.go index 38ba658f..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 strings.HasPrefix(req.Host, blacklisted) { + if strings.Split(req.Host, ":")[0] == blacklisted { log.Error("Got request with blacklisted host: %s", req.Host) return false }