mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
Merge pull request #297 from alexmozzhakov/patch-2
Fix for domains that begin with localhost and 127.0.0.1
This commit is contained in:
commit
c03a549c00
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ func (p *HTTPProxy) doProxy(req *http.Request) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, blacklisted := range blacklist {
|
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)
|
log.Error("Got request with blacklisted host: %s", req.Host)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue