The lack of questions on this issue both in this list and on the web seem to indicate that perhaps I'm missing something basic here, but anyway:
I have an nginx+openresty server that sends out JSON replies to clients that query it. To conserve bandwidth, I wish to compress these replies which are returned via ngx.say. The nginx.conf file seems to be configured correctly for this (gzip is on, gzip_types matching the content_by_lua type etc.) yet when the server is queried, the reply content is not returned compressed. I also have PHP connected to the same server and verified that requests to the PHP scripts do return compressed. Since I assume it is nginx and not PHP who is doing the gzip on the reply, I thought it would also work out of the box for Lua. What am I missing ?
Thanks for any advice,
Amnon