Improving detection of protocol to not accidentally add one protocol in front of the other.

This commit is contained in:
Renan DelValle 2018-12-17 18:06:40 -08:00
parent 56b325ed80
commit 67b37d5a42
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9

View file

@ -43,7 +43,7 @@ func init() {
func validateAndPopulateAuroraURL(urlStr string) (string, error) {
// If no protocol defined, assume http
if !(strings.HasPrefix(urlStr, "http") || strings.HasPrefix(urlStr, "https")) {
if !strings.Contains(urlStr, "://") {
urlStr = "http://" + urlStr
}