Sambhav Sharma
Sambhav Sharma

Reputation: 5860

Rails client IP ::1?

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

Answers (1)

Pascal
Pascal

Reputation: 8646

This is IP V6 Localhost/127.0.0.1

Upvotes: 6

Related Questions