feat: add response body limiter to routing HTTP client (#9478)

This commit is contained in:
Gus Eggert 2022-12-08 10:36:59 -05:00 committed by GitHub
parent 01e0bfa359
commit bf61e639e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)