This commit is contained in:
刘河
2019-01-10 21:40:57 +08:00
parent 61768ae0aa
commit f3435ebd40
2 changed files with 5 additions and 3 deletions

View File

@@ -157,7 +157,8 @@ func InitCsvDb() *Csv {
//get key by host from x
func GetKeyByHost(host string) (h *HostList, t *ServerConfig, err error) {
for _, v := range CsvDb.Hosts {
if strings.Contains(host, v.Host) {
s := strings.Split(host, ":")
if s[0] == v.Host {
h = v
t, err = CsvDb.GetTask(v.Vkey)
return