mirror of
https://github.com/1f349/violet.git
synced 2024-11-21 19:01:39 +00:00
Check internal round trip error
This commit is contained in:
parent
17cd9a9d64
commit
43eb689254
@ -167,6 +167,11 @@ func (r Route) internalServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
|||||||
} else {
|
} else {
|
||||||
resp, err = r.Proxy.SecureRoundTrip(req2)
|
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
|
// copy headers and status code
|
||||||
copyHeader(rw.Header(), resp.Header)
|
copyHeader(rw.Header(), resp.Header)
|
||||||
|
Loading…
Reference in New Issue
Block a user