On Sun, Apr 19, 2009 at 01:43:45PM -0700, rkmr...@gmail.com wrote:
Thanks a lot for this.
I want to do this only if this header is available. IF it is not available,
it should the client ip should be the default one.
how can i do that?
If the header is not available client address is not changed.
On Sun, Apr 19, 2009 at 9:48 AM, Michael Shadle <mike...@gmail.com> wrote:
make sure nginx has the "realip" module (nginx -V, look for
--with-http_realip_module) - you could try it and run nginx -t to
check the conf file to see if it's in your compile too.
Double check the header isn't a different case like
X-FB-User-Remote-Addr or something (if you saw this in PHP it would be
capitalized, but also prefixed with SERVER so maybe it is always
Lastly this is all you need. The first line is if you want to only
trust that header from another proxy / load balancer / etc, which you
probably do, so you can set it to the appropriate netmask.
On Sun, Apr 19, 2009 at 9:16 AM, rkmr...@gmail.com <rkmr...@gmail.com>
i get the clients ip address in this http header: X-FB-USER-REMOTE-ADDR.
do i configure nginx so that this is set as the ip address of client for
thanks a lot!