移动端,解析含有视频的富文本时,报 “混合内容: 通过HTTPS加载,但请求了一个不安全的帧,此请求已被阻止;必须通过HTTPS提供内容。”
Mixed Content : was loaded over HTTPS, but requested an insecure frame
This request has been blocked; the content must be served over HTTPS.
解决方法:
请求头加上 <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" /> 即可
如果还不行,再试以下方法:
文档网址: https://uniapp.dcloud.net.cn/collocation/manifest.html#h5-template
使用自定义模板
- 工程根目录下新建一个html文件;
- 复制下面的基本模板内容,到这个html文件,在此基础上修改meta和引入js;
- 在 manifest.json->h5->template 节点中关联这个html文件的路径。
第一:根目录下, index.html 文件,如果有 把文档的 内容 复制过来,如果没有index.html
文件 则 创建文件
第二: index.html 复制文档上的,然后加个
第三:找到 manifest.json 文件 =》源码视图=》h5 ,加个 “template” : “index.html” 即可
亲测有效