diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2020-05-06 12:37:44 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2020-05-06 12:37:44 -0600 |
commit | 1c17e6c6bb30f730581708d9725aab7ca0a8c560 (patch) | |
tree | 861f1a7bf71b0658252723bab5cbac3c068f88bf /modules/caddyhttp/reverseproxy | |
parent | b814c0af9c2c20a92f86e4db9836fd6b127dcf5b (diff) |
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.
Diffstat (limited to 'modules/caddyhttp/reverseproxy')
-rw-r--r-- | modules/caddyhttp/reverseproxy/caddyfile.go | 9 |
1 files changed, 0 insertions, 9 deletions
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 |