Hmmm.  Looking at the docs here:

  
http://docs.huihoo.com/api/ruby-on-rails/classes/ActionController/AbstractRequest.html#M000235

It looks like request.remote_ip is actually smart-ish and tries to
resolve the original IP.

I don't see an 'ip' method there (I've got to admit, I find the
standard ruby docs impenetrable.)

Maybe the heroku load balancers do something funny with requests?
Seems unlikely, but possible.

Heroku guys?

Cheers,
Carson

On Mar 14, 2:46 pm, kowsik <[email protected]> wrote:
> Try request.ip which uses the X-Forwarded-For header automatically.
>
> K.
> ---http://blitz.iohttp://twitter.com/pcapr
>
>
>
> On Mon, Mar 14, 2011 at 2:32 PM, Travis Reeder <[email protected]> wrote:
> > Check out the headers, you may find X-Forwarded-For or X-Forwarded-Proto
> > which will be the IP you want.
>
> > On Mon, Mar 14, 2011 at 1:42 PM, Carson Gross <[email protected]> wrote:
>
> >> Hello,
>
> >> I'm trying to get at the remote ip address for requests, and I'm using
> >> the standard
>
> >>  request.remote_ip
>
> >> method, but it appears that this is returning the same few IP's for
> >> all our users.  My guess is that this is the heroku load balancer at
> >> work, but that's just a shot in the dark.
>
> >> Any suggestions or pointers?
>
> >> Cheers,
> >> Carson
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Heroku" 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/heroku?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Heroku" 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/heroku?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" 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/heroku?hl=en.

Reply via email to