sub_filter via proxy with gzip

Steve Wilson lists-nginx at
Sat May 12 01:58:10 UTC 2012


For various reasons which I won't go into, I'm trying to rewrite content
via a proxy using a sub_filter, this is fine as long as I use
proxy_set_header Accept-Encoding "";
to disable gzip to the upstream proxy.

here's the relevant part with domains/mods changed:

    location / {
        proxy_set_header Accept-Encoding "";
        sub_filter_types text/css;
        sub_filter_once off;
        sub_filter special.our.domain;

basically "" has content served from
which we rewrite without issue as long as Accept-Encoding is empty.
Due to bandwidth constraints I could do with getting gzip or even
deflate working with the upstream.

How can this be done?


More information about the nginx mailing list