Use https when Insecure is selected.

This commit is contained in:
Eric Tune
2014-11-12 23:54:54 -08:00
parent 9f2750694c
commit dd3c85be09
2 changed files with 8 additions and 1 deletions

View File

@@ -231,7 +231,7 @@ func IsConfigTransportSecure(config *Config) bool {
func defaultServerUrlFor(config *Config) (*url.URL, error) {
version := defaultVersionFor(config)
// TODO: move the default to secure when the apiserver supports TLS by default
defaultSecure := config.CertFile != ""
defaultSecure := config.CertFile != "" || config.Insecure
host := config.Host
if host == "" {
host = "localhost"