fixed that error message with sensitive info shouldn't be shown to end user

This commit is contained in:
yusing 2024-10-05 03:42:09 +08:00
parent f5e00a6ef4
commit 5fb7d21c80

View file

@ -389,7 +389,7 @@ func (p *ReverseProxy) serveHTTP(rw http.ResponseWriter, req *http.Request) {
ProtoMajor: outreq.ProtoMajor,
ProtoMinor: outreq.ProtoMinor,
Header: make(http.Header),
Body: io.NopCloser(bytes.NewReader([]byte(errMsg))),
Body: io.NopCloser(bytes.NewReader([]byte("Origin server is not reachable."))),
Request: outreq,
ContentLength: int64(len(errMsg)),
TLS: outreq.TLS,