How to get the IP address of the request to a Heroku app? How to get the IP address of the request to a Heroku app? flask flask

How to get the IP address of the request to a Heroku app?


Checking Flask's documentation on filtering headers etc., I found that:

request.headers['X-Forwarded-For']

is where you'll get the client's real IP address.


From a deleted comment by OP, this article provides a safer solution.