原文:报跨域错误:Access to XMLHttpRequest at 'http://localhost:9990/' from origin 'http://IP:Port' has been blocked by CORS policy...more-private address space `local`

网上的错误:谷歌浏览器遇到CORS错误 提示:Access to XMLHttpRequest at http: localhost: from origin http: xxx.xx has been blocked by CORS policy: The request client is not a secure context and the resource is in more pri ...

2021-11-10 10:52 1 5233 推荐指数:

查看详情

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

场景:   前端是调用http://XXXXX:1808下的接口,但是网关代理后映射端口为18021,这导致前端页面接口显示也是18021,请求后端接口时需要。 解决:   问题:是浏览器自带的保证同源的安全策略,即:该页面下的js请求只能是同协议,同IP,同端口(CROS标准 ...

Sat Feb 26 00:46:00 CST 2022 0 3769
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM