typo,我的ngx.header["Content-Type"] = "application/json"
On Thursday, December 13, 2012 3:32:57 PM UTC+8, 王博 wrote:
我的nginx.conf大致如下:
server {
gzip on;
gzip_buffers 10 4k;
gzip_types text/plain application/x-_javascript_ text/css application/xml text/_javascript_ application/json text/xml;
location /path/to/lua {
content_by_lua_file /path/to.lua;
}
}
我的lua脚本输出了:
ngx.header["Content-Type"] = "text/html"
但是从结果来看,并没有执行gzip压缩?请问是什么原因?