fix http response code when forwarder node is not available
This commit is contained in:
@ -181,6 +181,7 @@ func (h *forwardHandler) handleHTTP(ctx context.Context, rw io.ReadWriter, log l
|
||||
}
|
||||
if target == nil {
|
||||
log.Warnf("node for %s not found", req.Host)
|
||||
resp.StatusCode = http.StatusBadGateway
|
||||
return resp.Write(rw)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user