ngx_lua 模块刚刚实现了 SSL cosocket API,尚未包含在现有的任何发布中,所以 lua-resty-http 也没有对
https 的现成的支持。不过 lua-resty-http 有一个分支已经使用新的 SSL cosocket 支持实现了 https: https://github.com/ 更多细节可以参见下面这个 ticket 里的讨论: https://github.com/pintsized/ 对于现有的 OpenResty 和 ngx_lua 发布,可以使用 ngx.location.capture + ngx_proxy 进行 https 后端通信,见这里给出的一个通过 https 访问 Google 搜索的代码示例: https://github.com/openresty/ Regards, -agentzh |