feat: add provider to obj get api

This commit is contained in:
Noah Hsu
2022-08-08 00:58:32 +08:00
parent 61fa6f38a8
commit d6437a337f
2 changed files with 19 additions and 8 deletions

View File

@ -16,7 +16,7 @@ func GetBaseUrl(r *http.Request) string {
protocol = "https"
}
if baseUrl == "" {
baseUrl = fmt.Sprintf("%s//%s", protocol, r.Host)
baseUrl = fmt.Sprintf("%s://%s", protocol, r.Host)
}
strings.TrimSuffix(baseUrl, "/")
return baseUrl