I am implementing a forward proxy in Go and I have 2 features that need to do:
Both of these features require to read request and response body and processing that would affect largely in performance by causing high memory consumption and slow response time for client.
Currently my flow is to ioutil.ReadAll
request and response body, get the Body size, md5 and sha256 checksum the response body, finally if we do not blocking anything, put the body back to the origin one for the client
I was wondering if there is any other best practice for handling these kind of things.