improve not found response (#3121)

This commit is contained in:
fatedier
2022-10-09 12:13:27 +08:00
committed by GitHub
parent 6ecc97c857
commit 6a71d71e58
3 changed files with 10 additions and 9 deletions

View File

@ -251,7 +251,7 @@ func (rp *HTTPReverseProxy) connectHandler(rw http.ResponseWriter, req *http.Req
remote, err := rp.CreateConnection(domain, url, routeByHTTPUser, remoteAddr)
if err != nil {
http.Error(rw, "Failed", http.StatusBadRequest)
_ = notFoundResponse().Write(client)
client.Close()
return
}