mirror of https://github.com/caddyserver/caddy.git
reverseproxy: Allow using TLS for port 80 upstreams (see #3361)
An upstream like https://localhost:80 is still forbidden, but an addr of localhost:80 can be used while explicitly enabling TLS as an override; we just don't allow the implicit behavior to be ambiguous.
This commit is contained in:
parent
b814c0af9c
commit
1c17e6c6bb
|
@ -151,15 +151,6 @@ func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
|||
}
|
||||
}
|
||||
|
||||
// if scheme is not set, we may be able to infer it from a known port
|
||||
if scheme == "" {
|
||||
if port == "80" {
|
||||
scheme = "http"
|
||||
} else if port == "443" {
|
||||
scheme = "https"
|
||||
}
|
||||
}
|
||||
|
||||
// the underlying JSON does not yet support different
|
||||
// transports (protocols or schemes) to each backend,
|
||||
// so we remember the last one we see and compare them
|
||||
|
|
Loading…
Reference in New Issue