I tried the solution here on Python, Flask client ip address. Everything works fine on the HTML side. But if I put this on python code (my app.py file) it shows different IPs.
On my App.py
ip_add = request.environ.get('HTTP_X_REAL_IP', request.remote_addr)
#shows ip on amazon. idk what I am doing wrong
On my index.html
{{request.environ.get('HTTP_X_REAL_IP', request.remote_addr)}}
#this works fine
Im running it on pythonanywhere by the way. Thanks and good day!