apache:

request.environ.get("HTTP_X_FORWARDED_FOR")

thanks



On Jan 5, 8:33 am, Didip Kerabat <[email protected]> wrote:
> I use both HTTP_X_FORWARDED_FOR and REMOTE_ADDR, just in case. See below:
>
> *  def get_ip_address():
>     return request.environ.get("HTTP_X_FORWARDED_FOR",
> request.environ.get("REMOTE_ADDR", None))*
>
> - Didip -
>
> On Mon, Jan 4, 2010 at 9:21 PM, Alagu Madhu <[email protected]> wrote:
>
> > The website is running apache.
>
> > request.environ["REMOTE_ADDR"]  -> 127.0.0.1
>
> > request.environ["X_REMOTE_ADDR"]  -> error
>
> > thanks
>
> > On Jan 5, 3:39 am, Jose Galvez <[email protected]> wrote:
> > > the environment variable may be different if you are serving the site
> > > from apache.  I think is X_REMOTE_ADDR or something like that
>
> > > Alagu Madhu wrote:
> > > > Hi
>
> > > > I try to get client IP using request.environ.get("REMOTE_ADDR"),it is
> > > > working.But It is not working in website.
>
> > > > Thanks
>
> > > > Madhu Alagu
>
> > > > --
>
> > > > You received this message because you are subscribed to the Google
> > Groups "pylons-discuss" group.
> > > > To post to this group, send email to [email protected].
> > > > To unsubscribe from this group, send email to
> > [email protected]<pylons-discuss%[email protected]>
> > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/pylons-discuss?hl=en.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "pylons-discuss" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<pylons-discuss%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/pylons-discuss?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


Reply via email to