class Lato::ApplicationController
def override_request_remote_ip
This method is used to get the real ip of the user when the application is behind a proxy.
This method override the request remote ip with the X-Forwarded-For header if exists.
def override_request_remote_ip request.remote_ip = request.headers['X-Forwarded-For'] if request.headers['X-Forwarded-For'] end