mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-22 20:59:19 +02:00
7086d286be
* Add feature migration notice * Remove legacy code of transport processing * Clear legacy proto field * Fix missing * Unify protocolname * Test remove * Supressor * Weird code * Remove errorgen related comments
17 lines
269 B
Go
17 lines
269 B
Go
package internet
|
|
|
|
import (
|
|
"net"
|
|
"strings"
|
|
)
|
|
|
|
func IsValidHTTPHost(request string, config string) bool {
|
|
r := strings.ToLower(request)
|
|
c := strings.ToLower(config)
|
|
if strings.Contains(r, ":") {
|
|
h, _, _ := net.SplitHostPort(r)
|
|
return h == c
|
|
}
|
|
return r == c
|
|
}
|