Chrome关闭跨域私网限制

若访问网址为公网地址,页面上有内网资源,即使资源配置了跨域请求,Chrome请求仍然会进行阻止,并出现跨域错误。

类似报错信息:

Access to video at 'https://example-internal.com/prd/video/kshf_video.mp4' from origin 'http://example-external.com' 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://flags/#block-insecure-private-network-requests

将条目 “Block insecure private network requests.” 的配置从 “Default” 改为 “Disabled” 即可。

发表评论

error: Content is protected !!