proxy: determine scheme based on TLSClientConfig

This commit is contained in:
Brian Waldon 2014-09-23 10:32:21 -07:00
parent 1ea3197feb
commit 73504dca41

View File

@ -5,7 +5,12 @@ import (
)
func NewHandler(t *http.Transport, addrs []string) (http.Handler, error) {
d, err := newDirector("http", addrs)
scheme := "http"
if t.TLSClientConfig != nil {
scheme = "https"
}
d, err := newDirector(scheme, addrs)
if err != nil {
return nil, err
}