Skip to content

request.remote_ip appears to return the wrong IP address #7979

@indirect

Description

@indirect

The last commit to the remote IP middleware appears to have deliberately reversed the algorithm that picks the remote IP out of a list of proxies. Unfortunately, the previous algorithm (which I wrote, and used in production with a few hundred thousand clients :P) is the one that agrees with the written spec for how X-Forwarded-For is supposed to work.

tl;dr plz to revert that part of the commit, I would like to be able to upgrade Rails and still have remote_ip return the right IP address.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions