mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Relax server HTTP host check
This commit is contained in:
parent
1113ee7fa2
commit
4c51636788
4 changed files with 6 additions and 4 deletions
|
@ -1,6 +1,8 @@
|
|||
package http
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/dice"
|
||||
"github.com/xtls/xray-core/transport/internet"
|
||||
|
@ -18,7 +20,7 @@ func (c *Config) getHosts() []string {
|
|||
func (c *Config) isValidHost(host string) bool {
|
||||
hosts := c.getHosts()
|
||||
for _, h := range hosts {
|
||||
if h == host {
|
||||
if strings.Contains(strings.ToLower(host), strings.ToLower(h)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue