handle https prefixes in baseUrl

This commit is contained in:
Mantas
2014-10-06 12:50:44 +03:00
committed by spf13
parent b98c2088f8
commit fb82f00f9d
2 changed files with 3 additions and 2 deletions

View File

@@ -136,7 +136,7 @@ func fixUrl(s string) (string, error) {
s = viper.GetString("BaseUrl")
useLocalhost = true
}
if !strings.HasPrefix(s, "http://") {
if !strings.HasPrefix(s, "http://") && !strings.HasPrefix(s, "https://") {
s = "http://" + s
}
u, err := url.Parse(s)