CORS错误从Intranet网页上要求到公共资源
我有一个本地Web服务器设置在192.168.1.39
带有域www.server.local.local
。 DNS已配置为在我的路由器上正确解决此问题。
直到最近,一切都很好。如果我访问页面,例如www.server.local/page.html
,我的浏览器开始报告以下错误。
Access to CSS stylesheet at 'https://cdn.jsdelivr.net/npm/[email protected]/dist/reset.css' from origin 'http://www.server.local' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`.
但是,如果使用http://192.168.1.39/page.html
使用,则页面打开了。
但是错误消息确实使我感到困惑,因为它表明在JSDELIVR托管的CSS位于私人地址空间中!严重地?!还是我想念什么?
我的浏览器:Microsoft Edge 94.0.992.31(官方构建)(x86_64)
I have a local web server set up at 192.168.1.39
with domain www.server.local
. DNS has been configured to resolve this properly on my router.
Everything worked just fine until recently. My browser started to report the following error if I access page like www.server.local/page.html
that references external resources.
Access to CSS stylesheet at 'https://cdn.jsdelivr.net/npm/[email protected]/dist/reset.css' from origin 'http://www.server.local' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`.
However, if http://192.168.1.39/page.html
is used, the page opens properly.
But the error message really confuses me, because it suggests the css hosted at jsdelivr is in a private address space! Seriously?! Or did I miss something?
My Browser: Microsoft Edge 94.0.992.31 (Official build) (x86_64)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试以下解决方案:
edge:// flags/#block-insecure-private-network-requests
block insecure insecure nistecure dissecure divessecure私有网络请求
。有关更多详细信息,您可以参考此博客: https:// developer。 chrome.com/blog/private-network-access-update/
You can try this solution:
edge://flags/#block-insecure-private-network-requests
Block insecure private network requests
.For more details, you could refer to this blog: https://developer.chrome.com/blog/private-network-access-update/