Decompressing a compressed response from upstream, applying transformations and then compressing for downstream again

Jonathan Matthews contact at
Mon Jan 20 14:50:51 UTC 2014

On 20 January 2014 14:34, Makailol Charls <makailol7 at> wrote:
> Hello Maxim,
> Would you suggest the code change to achieve this?

Instead of forking your own incompatible nginx version, I'd be tempted
to test this out:

Turn gzip on.
Always remove the Accept-Encoding header from the proxied request.
Perform the transformations on the uncompressed response.
Let nginx gzip the content on the way back to the client.

The ordering of the different modules you're using may spoil this
idea, of course, but I'd give it a go myself.


More information about the nginx mailing list