Skip to content

Commit

Permalink
feat: add response body limiter to routing HTTP client (#9478)
Browse files Browse the repository at this point in the history
  • Loading branch information
guseggert committed Dec 8, 2022
1 parent 01e0bfa commit bf61e63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion routing/delegated.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ func httpRoutingFromConfig(conf config.Router, extraHTTP *ExtraHTTPParams) (rout
transport.MaxIdleConnsPerHost = 100

delegateHTTPClient := &http.Client{
Transport: transport,
Transport: &drclient.ResponseBodyLimitedTransport{
RoundTripper: transport,
LimitBytes: 1 << 20,
},
}

key, err := decodePrivKey(extraHTTP.PrivKeyB64)
Expand Down

0 comments on commit bf61e63

Please sign in to comment.