The request client is not a secure context and the resource is in more-private address space `private`
时间:2022-08-24 15:48:03.401 +0800 CST 浏览:5563

chrome请求报错

has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space private

原因

是因为当前请求的地址是公网地址,然后请求的资源在内网地址,所以被chrome拦截

解决方法

  1. 在chrome中访问:chrome://flags/#block-insecure-private-network-requests,将其修改为disabled
  2. 将所有的地址全部修改为公网或者内网地址


如果这篇文章对你有所帮助,可以通过下边的“打赏”功能进行小额的打赏。

本网站部分内容来源于互联网,如有侵犯版权请来信告知,我们将立即处理。


来说两句吧