Check internal round trip error

This commit is contained in:
Melon 2023-07-11 01:11:56 +01:00
parent 17cd9a9d64
commit 43eb689254
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -167,6 +167,11 @@ func (r Route) internalServeHTTP(rw http.ResponseWriter, req *http.Request) {
} else {
resp, err = r.Proxy.SecureRoundTrip(req2)
}
if err != nil {
log.Printf("[ServeRoute::ServeHTTP()] Error receiving internal round trip response: %s\n", err)
utils.RespondVioletError(rw, http.StatusBadGateway, "error receiving internal round trip response")
return
}
// copy headers and status code
copyHeader(rw.Header(), resp.Header)