以前openresty 使用的是http2,同時配置了 ngx.location.capture 是可以的(1.12 版本,有點老),今天升級了openresty
到目前最新版本(1.15.8.1)出現了以下問題
content_by_lua(nginx-index-https.conf:47):5: ngx.location.capture http2 requests not supported yet
相關解決方法
別使用ngx.location.capture了,直接使用 lua-resty-http 模塊,當然如果可行,修改后端的服務接口也行
參考資料
https://github.com/openresty/lua-nginx-module/issues/1195
https://github.com/ledgetech/lua-resty-http