Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

request.remote_ip return same ip for all clients

#2830

I have a ip-protected area in my application.
I test if the request.remote_ip is equivalent to my fix ip.

But since the new rails update I receive for all clients the same ip.
It worked well before I made the rails update to 2.3.2 .

previous rails = 2.0.2
rails = 2.3.2
mongrel = 1.1.5
Apache = 2.2.3

Reported by Robin Wunderlin · June 24th, 2009 @ 12:49 PM

State: hold
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Francesc Esplugas
    Francesc Esplugas

    I use request.env['REMOTE_ADDR'] to achieve this. Hope that helps.

    June 29th, 2009 @ 03:03 PM

  2. Carl Lerche
    Carl Lerche
    • State changed from new to hold

    I'm sorry, but there isn't enough information for us to figure out what is going on.

    Could you provide in detail everything that changed between when everything worked and everything did not work. Could you also provide a failing test against 2-3-stable that illustrates the bug. This would allow us to perform a bisect and understand the problem better.

    July 2nd, 2009 @ 07:07 PM

  3. Robin Wunderlin
    Robin Wunderlin

    I can provied you with the environment varaibles of my rails application:

    84.253.XXX.XXX
    

    REMOTE_ADDR 217.150.XXX.XXX
    SERVER_NAME 217.150.XXX.XXX

    request.remote_ip return 217.150.XXX.XXX.

    But the address i want HTTP_X_FORWARDED_FOR

    July 24th, 2009 @ 10:17 AM