Hello!
On Thu, May 22, 2014 at 5:08 AM, Prashant Gaur wrote:
> I want to fetch response content which will be returned to browser by server
> .
> Use : I will parse whole response content for some of my special tags i
> provided .
> I know i can use body_filter_by_lua to fetch returned content' body .
> But that directive is not giving me facility
> to call redis as well as i am not able to use lots of API methods(like
> location.capture)
> Please tell me is there any alternative available ?
I think you can use the subrequest API for this. For example,
https://github.com/openresty/lua-nginx-module#ngxlocationcapture
But be careful when your response bodies are huge because this API
function captures the full response body of the subrequest in memory
(and in Lua space).
> also why openresty block API methods with body_filter_by_lua directive .
>
This is because of the limitations in NGINX output filter's current
implementation and there's nothing we can do on our side without
redesign that part in the NGINX core.
Regards,
-agentzh