业务场景
在HTTPS域名地址下预览视频时,出现以下提示:
Mixed Content: The page at ‘https://live.xxxx.com.cn/cjrh_web/common/preview.html?path=vedio/bE8cimSp/index.m3u8’ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘http://live.xxxxx.com.cn/images/vedio/bE8cimSp/index.m3u8’. This request has been blocked; the content must be served over HTTPS.
解决方案
页面的head中加入:
<meta http-equiv="Content-Security-Policy" content="upgrade-i