mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
Solve issue when dynamic upstreams use wrong protocol upstream.
This commit is contained in:
parent
2a97902c21
commit
3c9806ccb6
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue