mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: redirecting to http if http.proxy is running (should fix #29)
This commit is contained in:
parent
d57ae3637c
commit
e911f757c3
1 changed files with 3 additions and 0 deletions
|
@ -64,6 +64,9 @@ func NewHTTPProxy(s *session.Session) *HTTPProxy {
|
|||
|
||||
p.Proxy.NonproxyHandler = http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
if p.doProxy(req) == true {
|
||||
if p.isTLS == false {
|
||||
req.URL.Scheme = "http"
|
||||
}
|
||||
req.URL.Host = req.Host
|
||||
p.Proxy.ServeHTTP(w, req)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue