Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
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.
Matthew Holt committed
May 6, 2020 at 12:37 UTC
1c17e6c6bb30f730581708d9725aab7ca0a8c560
1 file changed
-9
modules/caddyhttp/reverseproxy/caddyfile.go
-9
@@ -151,15 +151,6 @@ func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
151
}
152
}
153
154
- // if scheme is not set, we may be able to infer it from a known port
155
- if scheme == "" {
156
- if port == "80" {
157
- scheme = "http"
158
- } else if port == "443" {
159
- scheme = "https"
160
- }
161
- }
162
-
154
// the underlying JSON does not yet support different
155
// transports (protocols or schemes) to each backend,
156
// so we remember the last one we see and compare them