Skip to content
This repository was archived by the owner on Mar 21, 2019. It is now read-only.
This repository was archived by the owner on Mar 21, 2019. It is now read-only.

Detecting visitor IP #9

@waruboy

Description

@waruboy

In the users_controller, you use request.env['HTTP_X_FORWARDED_FOR'] to detect the visitor IP. In my case, I'm using a standalone phusion passenger setup, and found it not working.

I change it to request.remote_ip, then it works. Later, I change my setup using nginx in front of phusion passenger. Still works.

Is there any reason you use request.env['HTTP_X_FORWARDED_FOR'] instead of request.remote_ip ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions