欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

access to image at from origin has been blocked by cors policy The request client is not a secure context and the resource is in more-private address space `local` 有大用 有大大用

1) chrome 设置一下

2) 很可能是代理的问题,,大约是翻译代理有些网址(shipingzhong.cn)是通过代理,有时网址(shipingzhong.cn/***.png)不通过代理


about:blank:1 Access to image at 'http://shipingzhong.cn/sites/default/files/ueditor/1/upload/catcher/20220614/1655191146796413.png' from origin 'http://shipingzhong.cn' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`.


A site requested a resource from a network that it could only access because of its users' privileged network position. These requests expose devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage.

To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them in Chrome 92 (July 2021).

To fix this issue, migrate the website that needs to access local resources to HTTPS. If the target resource is not served on localhost, it must also be served on HTTPS to avoid mixed-content issues.

Administrators can make use of the InsecurePrivateNetworkRequestsAllowed and InsecurePrivateNetworkRequestsAllowedForUrls enterprise policies to temporarily disable this restriction on all or certain websites.


CORS跨域问题:

升级谷歌浏览器最新chrome94版本后,提示Access to XMLHttpRequest at 'http://localhost:xxxx/api' from origin 'http://xxx.xxx.com:xxxx' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`.



解决办法:

打开浏览器,进入chrome://flags/页面



搜索Block insecure private network requests



设置为Disabled,Relaunch就好了。


来自 https://zhuanlan.zhihu.com/p/414533145




更新 chrome 94.0.4606.61 后,访问网站出现 CORS 错误!


  

   s609926202 · 265 天前 · 3825 次点击
这是一个创建于 265 天前的主题,其中的信息可能已经有所发展或是发生改变。

就是请求 CDN 资源,会发生错误。

我的网站是:www.abc.com

请求: https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/js/plugin.js 之类的资源,网络中提示:CORS 错误,控制台提示:

Access to CSS stylesheet at 'https://cdn.jsdelivr.net/npm/luckysheet/dist/assets/iconfont/iconfont.css' from origin 'http://www.abc.com' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`.

查询网上都是在 nginx 层处理,如:

add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'

已经在 www.abc.com 的 nginx 配置中进行如上设置,还是提示 CORS 设置?

请问如何正确的处理?

第 1 条附言  ·  265 天前
又一次被坑爹的 Clash For Windows 坑了,关闭代理后,访问正常。。。


来自  https://www.v2ex.com/t/804587




普通分类: