mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-11 21:10:30 +01:00
fix(middleware/redirect): use net.JoinHostPort for setting HTTPS host
This commit is contained in:
@@ -39,7 +39,7 @@ func (m *redirectHTTP) before(w http.ResponseWriter, r *http.Request) (proceed b
|
||||
}
|
||||
|
||||
if common.ProxyHTTPSPort != 443 {
|
||||
r.URL.Host = host + ":" + strconv.Itoa(common.ProxyHTTPSPort)
|
||||
r.URL.Host = net.JoinHostPort(host, strconv.Itoa(common.ProxyHTTPSPort))
|
||||
} else {
|
||||
r.URL.Host = host
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user