1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 10:08:15 -05:00

Skip validating on empty http host config

This commit is contained in:
heimoshuiyu 2023-01-15 21:37:04 +08:00 committed by Shelikhoo
parent 0dcf8cad0d
commit b8ab91b0d3
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -58,7 +58,7 @@ func (fw flushWriter) Write(p []byte) (n int, err error) {
func (l *Listener) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
host := request.Host
if !l.config.isValidHost(host) {
if len(l.config.Host) != 0 && !l.config.isValidHost(host) {
writer.WriteHeader(404)
return
}