mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 08:48:32 +02: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 {
|
if common.ProxyHTTPSPort != 443 {
|
||||||
r.URL.Host = host + ":" + strconv.Itoa(common.ProxyHTTPSPort)
|
r.URL.Host = net.JoinHostPort(host, strconv.Itoa(common.ProxyHTTPSPort))
|
||||||
} else {
|
} else {
|
||||||
r.URL.Host = host
|
r.URL.Host = host
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user