nginx rewrite help

Kevin Castiglione kevincastiglione at gmail.com
Fri Jun 19 04:26:22 MSD 2009


On Thu, Jun 18, 2009 at 8:23 AM, Edho P Arief <edhoprima at gmail.com> wrote:

> On Thu, Jun 18, 2009 at 10:10 PM, Kevin
> Castiglione<kevincastiglione at gmail.com> wrote:
> > 2009/6/18 Igor Sysoev <is at rambler-co.ru>
> >>
> >> Also, this
> >>
> >>       if ($http_x_forwarded_for ~ "(?:^|,)\s*(\d+\.\d+\.\d+\.\d+)\s*$")
> {
> >>           set  $addr  $1;
> >>       }
> >>
> >>       fastcgi_param REMOTE_ADDR     $addr;
> >>
> >> means that anyone may forge his address.
> >
> > without this my web app gets client ip address as the ip address of the
> > machine running nginx and not the actual client.
> >
>
> why not
>
> fastcgi_param REMOTE_ADDR  $remote_addr;
>
this works great!!!
thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090618/22076e6d/attachment.html>


More information about the nginx mailing list