mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-29 12:16:16 +08:00
Solve issue when dynamic upstreams use wrong protocol upstream.
This commit is contained in:
parent
2a97902c21
commit
3c9806ccb6
|
@ -298,7 +298,7 @@ func (h *HTTPTransport) RoundTrip(req *http.Request) (*http.Response, error) {
|
|||
func (h *HTTPTransport) SetScheme(req *http.Request) {
|
||||
if req.URL.Scheme == "" {
|
||||
req.URL.Scheme = "http"
|
||||
if h.TLS != nil {
|
||||
if h.TLS != nil && req.URL.Port() != "80" {
|
||||
req.URL.Scheme = "https"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user