useEffect(() => {
const get_ip = async () => {
console.log("got here");
const response = await fetch("https://geolocation-db.com/json/");
const data = await response.json();
console.log(data);
};
get_ip();
}, [])
This is the error that is printed out:
GET https://geolocation-db.com/json/ net::ERR_BLOCKED_BY_CLIENT
What is wrong here? Why can’t I fetch the IP from that website?
I can visit it fine in my browser.
>Solution :
The GET request is blocked by an adblocker.