Skip to content

Commit

Permalink
http_print: print proxy name in resp body
Browse files Browse the repository at this point in the history
Fixes #500
  • Loading branch information
Choraden committed Nov 6, 2023
1 parent 608c766 commit d110361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http_proxy_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (hp *HTTPProxy) errorResponse(req *http.Request, err error) *http.Response

hp.metrics.error(label)

body := fmt.Sprintf("%s\n%s\n", msg, err)
body := fmt.Sprintf("%s: %s\n%s\n", hp.config.Name, msg, err)
resp := proxyutil.NewResponse(code, bytes.NewBufferString(body), req)
resp.Header.Set(ErrorHeader, err.Error())
resp.Header.Set("Content-Type", "text/plain; charset=utf-8")
Expand Down

0 comments on commit d110361

Please sign in to comment.