mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-01 01:44:15 +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
|
@ -39,7 +39,7 @@ func (s *server) Handle(conn net.Conn) (stat.Connection, error) {
|
|||
|
||||
if s.config != nil {
|
||||
host := req.Host
|
||||
if len(s.config.Host) > 0 && host != s.config.Host {
|
||||
if len(s.config.Host) > 0 && !strings.Contains(strings.ToLower(host), strings.ToLower(s.config.Host)) {
|
||||
return nil, errors.New("bad host: ", host)
|
||||
}
|
||||
path := s.config.GetNormalizedPath()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue