I am using an API to get the IP address of users when loading the Web Application to forward them info based on their location. However, I am getting the location of the AWS server and not the clients. By the way I am using Heroku. Here is the code below.
ipCall = requests.get('https://ip.seeip.org/jsonip?').content
ldata = json.loads(ipCall)
ip = ldata['ip']
ipLocate = requests.get(f'http://ip-api.com/json/{ip}').content
jdata = json.loads(ipLocate)
state = jdata['regionName']
locationFilt = jdata['city']
Here is the output on the web page: Location: Ashburn, VA. This is the location of the AWS server and not the clients.