Hello!
On Mon, Jul 8, 2013 at 8:05 PM, Viktor malezink wrote:
> Ain't see changes in html from browsers(Chrome,SrWare,Firefox,IE,Opera) but
> when i load page from curl or wget i see that html has changed.
> So i decided(maybe mistake) that webbrowser ignore(how?) html from openresty
> and load from origin source. But how to deal with that?
One major difference between curl/wget and your web browsers is that
the former does not send the "Accept-Encoding: gzip" request header by
default. If your backend server compresses the HTTP response, nginx
will not automatically uncompress the data before feeding it into its
output filter chain. You can also test this case with curl by
specifying the --compressed command-line option, as in
curl --compressed
http://localhost:8080/
One work-around is to disable gzip compression on your backend servers
by adding the following line to your nginx.conf:
proxy_set_header Accept-Encoding "";
And you can still enable gzip compression on your nginx side because
the standard ngx_gzip module runs *after* body_filter_by_lua.
Regards,
-agentzh