mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
misc: minor optimization to the http proxy code
This commit is contained in:
parent
1afc21ac64
commit
13be09c510
1 changed files with 2 additions and 1 deletions
|
@ -97,8 +97,9 @@ func (p *HTTPProxy) doProxy(req *http.Request) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
host := strings.Split(req.Host, ":")[0]
|
||||
for _, blacklisted := range blacklist {
|
||||
if strings.Split(req.Host, ":")[0] == blacklisted {
|
||||
if host == blacklisted {
|
||||
log.Error("Got request with blacklisted host: %s", req.Host)
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue