mirror of
https://github.com/1f349/violet.git
synced 2024-12-22 07:24:04 +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 {
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user