mirror of
https://github.com/openziti/zrok.git
synced 2025-08-18 03:39:58 +02:00
return 502 on proxy error (#703)
This commit is contained in:
@@ -95,6 +95,7 @@ func newReverseProxy(cfg *BackendConfig) (*httputil.ReverseProxy, error) {
|
||||
}
|
||||
proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) {
|
||||
logrus.Errorf("error proxying: %v", err)
|
||||
w.WriteHeader(http.StatusBadGateway)
|
||||
}
|
||||
|
||||
return proxy, nil
|
||||
|
Reference in New Issue
Block a user