Hello!
On Thu, Feb 5, 2015 at 10:40 PM, coderesty wrote:
> openresty里面有没有解析mime.types生成一个字典, 然后我根据请求的扩展名直接去获取cont-type, 然后返回。
>
你总是可以自己在 Lua 里面解析。直接访问 nginx 内部的数据结构或许可以更高效一些,但需要自己编写一个类似
ngx_lua_upstream 这样的 nginx C 模块自己暴露 Lua API 了,见
https://github.com/openresty/lua-upstream-nginx-module
Regards,
-agentzh