I have included some untested code, if you can verify it that will be great.
You are making a call to get the IP address from https://api.ipify.org?format=json and then passing the IP address to http://ip-api.com/json/{ip}. This is not necessary. If you call ipinfo without passing an IP address, the information returned will be about the IP address.
Description
As discussed in: https://github.com/datawookie/medusa-proxy/issues/7
✅ Checks
Difference in location payload response:
Existing response:
IPinfo modified response:
I have included some untested code, if you can verify it that will be great.
You are making a call to get the IP address from
https://api.ipify.org?format=json
and then passing the IP address tohttp://ip-api.com/json/{ip}
. This is not necessary. If you callipinfo
without passing an IP address, the information returned will be about the IP address.