Unverified Commit 96e12c4b authored by jferic's avatar jferic Committed by GitHub
Browse files

fix host for cli (#2632)

parent ec3a8071
Showing with 1 addition and 1 deletion
+1 -1
...@@ -142,7 +142,7 @@ func setHost() error { ...@@ -142,7 +142,7 @@ func setHost() error {
return errors.Errorf("invalid host format, it should be http[s]://<domain>") return errors.Errorf("invalid host format, it should be http[s]://<domain>")
} }
hostHasOpenApi := strings.Index(host, "openapi.") != -1 hostHasOpenApi := strings.Index(host, "openapi.") != -1
var openAPIAddr string openAPIAddr := host
if strings.HasPrefix(host, "https") { if strings.HasPrefix(host, "https") {
if !hostHasOpenApi { if !hostHasOpenApi {
openAPIAddr = "https://openapi." + host[slashIndex+3:] openAPIAddr = "https://openapi." + host[slashIndex+3:]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment