title: How to prevent nginx reverse proxy recompress the upstream compressed response?
body: <p>I have nginx reverse proxy that receives brotli compressed response from upstream (Varnish cache). But, the reverse proxy serves brotli compressed response to browser only if I setup &quot;brotli on;&quot; within the reverse proxy server block.</p>
  <p>My goal is to have the nginx reverse proxy not handle compression at all. To achieve this, I have following questions:</p>
  <ol>
  <li><p>Is the reverse proxy block expected to un-compress the received response and handle it on it's own? Can't it directly pass the upstream response back to client?</p>
  </li>
  <li><p>Is there a way to dump proxy response or it's size to nginx logs? This shall help debug the issue better.</p>
  </li>
  </ol>