Skip to content

Commit

Permalink
set an http default
Browse files Browse the repository at this point in the history
  • Loading branch information
vultj committed Sep 27, 2022
1 parent fb3654f commit 021f41a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vultr/loadbalancers.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,14 @@ func buildForwardingRules(service *v1.Service) ([]govultr.ForwardingRule, error)
klog.V(3).Infof("When frontend proto is tcp, backend must also be tcp, setting backend to tcp")
backendProtocol = "tcp"
}
case "http", "https":
case "http":
if backendProtocol != "http" && backendProtocol != "https" {
klog.V(3).Infof("When frontend proto is http/s, backend must also be http/s, setting backend to https")
klog.V(3).Infof("When frontend proto is http, backend must also be http, setting backend to http")
backendProtocol = "http" // http is default
}
case "https":
if backendProtocol != "http" && backendProtocol != "https" {
klog.V(3).Infof("When frontend proto is https, backend must also be https, setting backend to https")
backendProtocol = "https" // https is default
}
}
Expand Down

0 comments on commit 021f41a

Please sign in to comment.