Skip to content

Commit

Permalink
reverseproxy: Allow using TLS for port 80 upstreams (see #3361)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mholt committed May 6, 2020
1 parent b814c0a commit 1c17e6c
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions modules/caddyhttp/reverseproxy/caddyfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1c17e6c

Please sign in to comment.