"No 'Access-Control-Allow-Origin' header is present on the requested resource" 问题

来源:互联网 发布:程序员修改bug搞笑图 编辑:程序博客网 时间:2024/06/11 09:42

当一个资源从与该资源本身所在的服务器不同的域或端口请求一个资源时,资源会发起一个跨域 HTTP 请求。
参:HTTP访问控制(CORS)

问题:

Failed to load https://***.com/*.mpd:  has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://reference.dashif.org' is therefore not allowed access.

解决方法:
使用--disable-web-security
Win:

"c:\Program Files\Google\Chrome\Application\chrome.exe" --user-data-dir="C:/Chrome dev session" --disable-web-security

Mac:

open -na /Applications/Google\ Chrome.app --args --user-data-dir="/var/tmp/Chrome dev session" --disable-web-security

阅读全文
0 0