mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
feat: add response body limiter to routing HTTP client (#9478)
This commit is contained in:
parent
01e0bfa359
commit
bf61e639e9
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user