Request.ip() question


#1

I’m trying to test the request.ip() method, but all I get is my home IP. I’ve tried piping my dev server through ngrok, but still getting 127.0.0.1.

In production, will this method return the clients IP address? Or is it just used to verify that requests are being handled on my host machine?

Docs are not clear. They just say user, which I assume is being used synonymously with client, but since there doesn’t appear to be a way to test this, I’m asking.


#2

When accessing the ip on localhost, it will be always be 127.0.0.1, since you are not visiting the website using your internet router.

However, with ngrok, it should display the public ip of your internet. Can you please share

  1. How you started the ngrok server?
  2. And what you url you are visiting?