Check if the upstream source has gzip turned on, if so you need
proxy_set_header Accept-Encoding "";
so the whole thing would be something like
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;
}
Check these links
- https://www.ruby-forum.com/topic/178781
- https://forum.nginx.org/read.php?2,226323,226323
- http://www.serverphorums.com/read.php?5,542078