mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-20 15:55:48 +00:00
[sub] fix bug in http link without host
This commit is contained in:
@@ -532,7 +532,11 @@ func searchHost(headers interface{}) string {
|
||||
switch v.(type) {
|
||||
case []interface{}:
|
||||
hosts, _ := v.([]interface{})
|
||||
return hosts[0].(string)
|
||||
if len(hosts) > 0 {
|
||||
return hosts[0].(string)
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
case interface{}:
|
||||
return v.(string)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user