Steve Wilson
May 11, 2012 10:00PM
Hey,

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 "";
proxy_pass http://upstream.site/;
sub_filter_types text/css;
sub_filter_once off;
sub_filter .upstream.site special.our.domain;
}

basically "upstream.site" has content served from static.upstream.site
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?

Steve.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

sub_filter via proxy with gzip

Steve Wilson May 11, 2012 10:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 195
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready