Skip to content

Commit

Permalink
Skip validating on empty http host config
Browse files Browse the repository at this point in the history
  • Loading branch information
heimoshuiyu committed Jan 15, 2023
1 parent 42b1667 commit f7ddaf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transport/internet/http/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f7ddaf9

Please sign in to comment.