简体   繁体   English

如何解决此请求已被阻止; 内容必须通过 HTTPS 提供

[英]how to solve This request has been blocked; the content must be served over HTTPS

how should I make this called to avoid blocking request?我应该如何调用它以避免阻塞请求?

const getLocation = async () => {

   const LOCATION_URL = 'http://ip-api.com/json/?fields=country,city,lat,lon,timezone';

   const response = await axios.get(LOCATION_URL);
   return response.data;
}

Website secured by ssl (https) can only access resources that are also secured with ssl受 ssl (https) 保护的网站只能访问同样受 ssl 保护的资源

Checking the documentation reveals that:检查文档显示:

256-bit SSL encryption is not available for this free API. 256 位 SSL 加密不适用于此免费 API。 Please see our pro service.请查看我们的专业服务。 截屏

You have a few options now:你现在有几个选择:

  1. Buy premium购买溢价
  2. Use different API provider使用不同的 API 提供程序
  3. Create a backend proxy that will fetch the data and send it to you创建一个后端代理,它将获取数据并将其发送给您

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在https上阻止了Angular templateUrl。 内容必须通过HTTPS提供。” - Angular templateUrl blocked on https “This request has been blocked; the content must be served over HTTPS.” Chrome扩展程序出错-“混合内容:此请求已被阻止; 内容必须通过HTTPS投放” - Error with Chrome extension - “Mixed Content: This request has been blocked; the content must be served over HTTPS” 混合错误:此请求已被阻止; 内容必须通过 HTTPS 提供 - Mixed Error: This request has been blocked; the content must be served over HTTPS API请求被阻止,内容必须通过HTTPS提供 - API request blocked and the content must be served over HTTPS 混合内容 jQuery ajax HTTPS 请求已在 Laravel 上被阻止 - Mixed content jQuery ajax HTTPS request has been blocked on Laravel Codeigniter - jquery.min.js:4 混合内容:内容必须通过 HTTPS 提供 - Codeigniter - jquery.min.js:4 Mixed Content: the content must be served over HTTPS API 数据超过 http 在通过 https 提供服务的站点中,脚本有“混合内容”错误 - API data over http in site served over https, script has “mixed content” error 如何解决“Redirect has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header'? - How to solve 'Redirect has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header'? 如何解决`Access to XMLHttpRequest from Origin is has been blocked by CORS policy.`错误? - How to solve `Access to XMLHttpRequest from Origin is has been blocked by CORS policy.` error? http 请求已被 https 阻止 - http request has been block from https
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM