Skip to content

Commit

Permalink
separate UpdateHeaders from UpdateParams (#673)
Browse files Browse the repository at this point in the history
Signed-off-by: novikov <novikov46en@gmail.com>
  • Loading branch information
paragor committed Dec 3, 2023
1 parent a3d24d2 commit 3ad1b12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/proxy/engines/httpproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ func PrepareFetchReader(r *http.Request) (io.ReadCloser, *http.Response, int64)

headers.AddForwardingHeaders(r, o.ForwardedHeaders)

if pc != nil && len(pc.RequestParams) > 0 {
if pc != nil && len(pc.RequestHeaders) > 0 {
headers.UpdateHeaders(r.Header, pc.RequestHeaders)
}
if pc != nil && len(pc.RequestParams) > 0 {
qp, _, _ := params.GetRequestValues(r)
params.UpdateParams(qp, pc.RequestParams)
params.SetRequestValues(r, qp)
Expand Down

0 comments on commit 3ad1b12

Please sign in to comment.