return ssl alert unrecognized_name when https domain not registered (#3620)

This commit is contained in:
Zeyu Dong
2023-09-18 02:28:05 -04:00
committed by GitHub
parent bae0b4d7c0
commit 5c8ea51eb5
5 changed files with 28 additions and 9 deletions

View File

@@ -251,7 +251,7 @@ func (rp *HTTPReverseProxy) connectHandler(rw http.ResponseWriter, req *http.Req
remote, err := rp.CreateConnection(req.Context().Value(RouteInfoKey).(*RequestRouteInfo), false)
if err != nil {
_ = notFoundResponse().Write(client)
_ = NotFoundResponse().Write(client)
client.Close()
return
}