You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
418 B
24 lines
418 B
package storage
|
|
|
|
func getUpHost(config *Config, ak, bucket string) (upHost string, err error) {
|
|
var zone *Zone
|
|
if config.Zone != nil {
|
|
zone = config.Zone
|
|
} else if zone, err = GetZone(ak, bucket); err != nil {
|
|
return
|
|
}
|
|
|
|
scheme := "http://"
|
|
if config.UseHTTPS {
|
|
scheme = "https://"
|
|
}
|
|
|
|
host := zone.SrcUpHosts[0]
|
|
if config.UseCdnDomains {
|
|
host = zone.CdnUpHosts[0]
|
|
}
|
|
|
|
upHost = scheme + host
|
|
return
|
|
}
|