Skip to content

Commit d76b4ac

Browse files
Don't use "dst" literal as sni name on https backends with host=dst is set (#917)
Fixes #916
1 parent adbc14a commit d76b4ac

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

route/route.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ func (r *Route) addTarget(service string, targetURL *url.URL, fixedWeight float6
7575
t.Host = opts["host"]
7676
t.ProxyProto = opts["pxyproto"] == "true"
7777

78-
if t.Host != "" && (t.URL.Scheme == "https" || opts["proto"] == "https") {
78+
// if Host is "dst", we don't need a special transport to override the sni because
79+
// this is already the default behavior.
80+
if t.Host != "" && t.Host != "dst" && (t.URL.Scheme == "https" || opts["proto"] == "https") {
7981
t.Transport = transport.NewTransport(&tls.Config{ServerName: t.Host, InsecureSkipVerify: t.TLSSkipVerify})
8082
}
8183

0 commit comments

Comments
 (0)