Fix for requests with port specified

This commit is contained in:
Alexey Mozzhakov 2018-06-23 19:17:16 +03:00 committed by GitHub
commit 18c74ce6ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}