diff --git a/download.go b/download.go index 6415b61e785ce917dbaeb133e94ef5f82ce97401..bfd5e258e32c32ff7e4e8ec6522f96344ceda939 100644 --- a/download.go +++ b/download.go @@ -28,7 +28,9 @@ func handleRdpDownload(w http.ResponseWriter, r *http.Request) { return } - var host = conf.Server.HostTemplate + // do a round robin selection for now + rand.Seed(time.Now().Unix()) + var host = conf.Server.Hosts[rand.Intn(len(conf.Server.Hosts))] for k, v := range data.(map[string]interface{}) { if val, ok := v.(string); ok == true { host = strings.Replace(host, "{{ " + k + " }}", val, 1)