Skip to content

Commit

Permalink
fix(cli): "cdsctl verify" don't use advertised API URL (#5391)
Browse files Browse the repository at this point in the history
cdsctl verify now uses the api url provided in arguments instead of url advertised by CDS verify response. It will display a warning when provided and advertised URLs differ from each other.
This is useful when cdsctl verify is used where the advertised user facing URL is not reachable.
It also makes verify command consistent with login command behavior

Signed-off-by: phsym <[email protected]>
  • Loading branch information
phsym authored Aug 25, 2020
1 parent 8295a9d commit fe479ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cli/cdsctl/signup.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,8 @@ func signupVerifyFunc(v cli.Values) error {
return err
}

return doAfterLogin(client, v, signupresponse.APIURL, sdk.ConsumerLocal, signupresponse)
if apiURL != signupresponse.APIURL {
fmt.Println("WARNING: The advertised API URL differs from the provided URL")
}
return doAfterLogin(client, v, apiURL, sdk.ConsumerLocal, signupresponse)
}

0 comments on commit fe479ec

Please sign in to comment.