Nginx 0.6.34 and above have changed the gzip_vary directive to add
the “Vary: Accept-Encoding” header to uncompressed responses as well as
The change is specifically:
Changes with nginx 0.6.34 27 Nov
*) Change: now the "gzip_vary" directive turned on issues a "Vary: Accept-Encoding" header line for uncompressed responses
Unfortunately for me, this change prevents us from using our CDN.
Our CDN will not cache requests for non gzipped content that has the
Vary header. Thus, this defeats the purpose of our CDN for a large part
of our image and audio content.
For the time being, this means I have to remove the changes to the
nginx_http_gzip_static_module.c to prevent this header from showing up.
Short of hacking nginx_http_gzip_static_module.c, is there a way to
this Vary header from showing up with non-gzipped content? If not, would
be possible to make this directive configurable?
Also may I ask why this change was made? Is there something I am
missing relating to the HTTP spec for this?
Thank you for you time,