mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-29 19:58:48 +00:00
fix bug in http link without host
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
parent
cc3ff61ae2
commit
ae55fdc38a
1 changed files with 5 additions and 1 deletions
|
@ -590,7 +590,11 @@ func searchHost(headers interface{}) string {
|
||||||
switch v.(type) {
|
switch v.(type) {
|
||||||
case []interface{}:
|
case []interface{}:
|
||||||
hosts, _ := v.([]interface{})
|
hosts, _ := v.([]interface{})
|
||||||
|
if len(hosts) > 0 {
|
||||||
return hosts[0].(string)
|
return hosts[0].(string)
|
||||||
|
} else {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
case interface{}:
|
case interface{}:
|
||||||
return v.(string)
|
return v.(string)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue