Accessing backend response using nginx' Perl module

agentzh agentzh at gmail.com
Mon Oct 5 07:16:45 MSD 2009


On Mon, Oct 5, 2009 at 5:07 AM, Srebrenko Sehic <ssehic at gmail.com> wrote:
> Hi,
>
> I have a simple reverse proxy setup where a Perl module does some
> processing on the request and then forwards the request via the proxy
> module using an internal_redirect method. I also need to adjust the
> response from the backend. This includes the headers and body.
>

An example of using internal_redirect is the upload module:

  http://www.grid.net.ru/nginx/upload.en.html

Regarding response header and body processing, I think you need an
output header filter and an output body filter here. See the core
module addition for sample code:

  http://wiki.nginx.org/NginxHttpAdditionModule

Cheers,
-agentzh





More information about the nginx mailing list