bugfix (cli) Update the URL check to work with https
This commit is contained in:
+6
-1
@@ -35,7 +35,12 @@ func getClient(serverUrl string) *client.Client {
|
||||
fatal("Need --server or FISSION_URL set to your fission server.")
|
||||
}
|
||||
|
||||
serverUrl = "http://" + strings.TrimPrefix(serverUrl, "http://")
|
||||
isHttps := strings.Index(serverUrl, "https://") == 0
|
||||
isHttp := strings.Index(serverUrl, "http://") == 0
|
||||
|
||||
if !isHttp && !isHttps {
|
||||
serverUrl = "http://" + serverUrl
|
||||
}
|
||||
|
||||
return client.MakeClient(serverUrl)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user