Fixed https prepend logic (#265)

This commit is contained in:
Nate Walck
2017-10-26 11:16:31 -04:00
committed by Victor Vrantchan
parent aab6e291eb
commit a0b092af5c

View File

@@ -97,8 +97,8 @@ func setCmd(cfg *ClientConfig, args []string) error {
}
if *flServerURL != "" {
if !strings.HasPrefix(*flServerURL, "http") ||
!strings.HasPrefix(*flServerURL, "https") {
if !(strings.HasPrefix(*flServerURL, "http") ||
strings.HasPrefix(*flServerURL, "https")) {
*flServerURL = "https://" + *flServerURL
}
u, err := url.Parse(*flServerURL)