https://stackoverflow.com/questions/15963532
سؤال
Can I access the IP address of the client from request header?If yes,how?
المحلول
Yes you can.
visitor_ip = request.env['REMOTE_ADDR']