how nginx deal with gzipped responses when gzip is on

Zhang Chao zchao1995 at
Fri Jul 14 01:25:00 UTC 2017


NGINX will check the Content-Encoding header, so if this header exists,
gzip filter will be bypassed.

On 14 July 2017 at 02:39:07, foxgab (nginx-forum at wrote:

i configred nginx with gzip directives:
http {
gzip on;
gzip_types text/css application/javascript;
gzip_comp_level 9;
gzip_http_version 1.0;
gzip_proxied any;

some upstream servers have already gzipped the response, i see the lengh of
the respense is similar to that send from nginx to client, i'm very curious
to know if nginx just bypassed that response, zipped again or
unzipped&rezipped it.

Posted at Nginx Forum:,275479,275479#msg-275479

nginx mailing list
nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list