From 1c17e6c6bb30f730581708d9725aab7ca0a8c560 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 6 May 2020 12:37:44 -0600 Subject: 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. --- modules/caddyhttp/reverseproxy/caddyfile.go | 9 --------- 1 file changed, 9 deletions(-) (limited to 'modules') diff --git a/modules/caddyhttp/reverseproxy/caddyfile.go b/modules/caddyhttp/reverseproxy/caddyfile.go index e1c9724..0a14f09 100644 --- a/modules/caddyhttp/reverseproxy/caddyfile.go +++ b/modules/caddyhttp/reverseproxy/caddyfile.go @@ -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 -- cgit v1.2.3