从 geolocation-db.com 获取 IP 时出错

una*_*der 2 html javascript ip geolocation reactjs

  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();
  }, [])
Run Code Online (Sandbox Code Playgroud)

这是打印出来的错误:

GET https://geolocation-db.com/json/ net::ERR_BLOCKED_BY_CLIENT
Run Code Online (Sandbox Code Playgroud)

这里有什么问题吗?为什么我无法从该网站获取 IP?

我可以在浏览器中正常访问它。

小智 5

GET 请求被广告拦截器拦截。