Merge pull request #10031 from ywk253100/191128_config

Fix bug when trying to get the external URL
This commit is contained in:
Wang Yan 2019-12-05 14:26:54 +08:00 committed by GitHub
commit 2fb1cc89d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ func ExtURL() (string, error) {
log.Errorf("failed to load config, error %v", err)
}
l := strings.Split(endpoint, "://")
if len(l) > 0 {
if len(l) > 1 {
return l[1], nil
}
return endpoint, nil