Local processing return values from fastcgi_pass

For example I have one fastcgi_pass location block and I want to process
the
return values of a request to use in a second fastcgi_pass, is this
possible
?

location … {

fastcgi_pass server1;

server1 returns some values

process these values and call another fastcgi_pass server

if (!$valuechecked) { return 404; }
fastcgi_pass server2;
}

Posted at Nginx Forum:

tnx Maxim, I’m going to try to solve this with Lua.

Posted at Nginx Forum:

Hello!

On Fri, Aug 01, 2014 at 08:48:24AM -0400, itpp2012 wrote:

fastcgi_pass server2;
}

If you are able to control the backend, this is something to be
done with X-Accel-Redirect. If you can’t, and you have to inspect
response body returned by server1, then the “out of the box”
options is to use SSI include with “set” parameter, and do
appropriate processing in SSI. Or you may consider eval module by
Valery K., see here:

http://grid.net.ru/nginx/eval.en.html

(not sure if it’s still works though)


Maxim D.
http://nginx.org/