has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `private`.
时间: 2023-09-21 18:10:13 浏览: 122
350-701.pdf
"has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `private`"这条错误提示表示浏览器阻止了跨域请求,因为请求的客户端不是在安全上下文中,并且请求的资源位于更私密的地址空间中,是私有的。这种错误通常发生在浏览器的安全策略中,用于防止潜在的安全风险。浏览器要求跨域请求必须在安全的上下文(如HTTPS)中进行,而且请求的资源必须是公共可访问的,而不是私有的。如果您遇到这个错误,您可以考虑以下几种解决方法:
1. 确保请求的客户端位于安全上下文中,使用HTTPS协议发送请求而不是HTTP。
2. 确保请求的资源是公共可访问的,而不是私有的。如果资源是私有的,您可以考虑将其设为公共可访问或在服务器端进行适当的配置。
3. 检查浏览器的安全策略设置,确保没有禁用或限制跨域请求。您可以查看浏览器文档或搜索特定浏览器的解决方案来了解如何配置安全策略。
请注意,解决这个问题可能需要对您的应用程序或服务器进行适当的配置和调整,以确保安全性和正确的跨域访问。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [【网络安全】Chrome 94 CORS private adress 问题](https://blog.csdn.net/th3383193/article/details/128226602)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [has been blocked by CORS policy: The request client is not a secure context and the resource is in..](https://blog.csdn.net/xiaoyuer_2020/article/details/125184448)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文