Question

Can I access the IP address of the client from request header?If yes,how?

Was it helpful?

Solution

Yes you can.

visitor_ip = request.env['REMOTE_ADDR']
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top