Reputation: 5860
I am trying to fetch client IP from Rails, but when I am testing this on my local machine I get ::1
instead of 127.0.0.1
.
I have tried the following two approaches in my controller:
request.remote_addr
request.remote_ip
Trying on Rails 5 beta3 if that matters.
Upvotes: 1
Views: 1281