rdegges/ipify-api

https://api.ipify.org/?format=jsonp&callback=<anything> redrects to data:text/plain, and doesn't return the ip

m00nwtchr opened this issue · 1 comments

i tried to get the ip info using:

$.getJSON("https://api.ipify.org?format=jsonp&callback=?", function(json) {
    ip = json.ip;
});

but the callback doesn't get called and in the Network tab of devtools shows me that the request got redirected to data:text/plain,

Just tried using your snipet and it works. You defined ip as json.ip, but you dont use it.
add console.log(ip) or console.log(json.ip) and it will log the ip.
If that doesnt work check that the page has jquery or your network.