遇到This request has been blocked; the content must be served over HTTPS怎么办

1、错误分析

HTTPS的安全策略,浏览器会阻断HTTPS上的非安全请求(HTTP)请求。所以,在HTTPS访问的页面中,无法调用http的接口。那么该如何解决呢。项目实现中需要,在前端直接调用LiveGBS的接口。直接开启LiveGBS的https,调用服务的https接口。

2、开启HTTPS

2.1、准备https证书

2.1.1、选择Nginx类型证书下载

调用LiveGBS国标GB/T28181视频直播平台遇到This request has been blocked; the content must be served over HTTPS怎么办?_GB28181国标平台

2.2、配置 LiveCMS 开启 HTTPS

livecms.ini > [https] > 配置证书路径和 CMS HTTPS 端口, 取消前面的注释配置证书的绝对路径

ssl_cert_file= .pem的绝对路径
ssl_key_file= .key 的绝对路径

如:

[https]
; 可选配置开启 HTTPS 服务
port=10010
ssl_cert_file=/root/ssl/localhost_cert.pem
ssl_key_file=/root/ssl/localhost_key.pem

调用LiveGBS国标GB/T28181视频直播平台遇到This request has been blocked; the content must be served over HTTPS怎么办?_GB/T28181_02

2.3、重启LiveCMS

3、验证HTTPS服务

以上配置操作完成后, 重启 LiveCMS, 浏览器访问 https://证书域名: HTTPS 端口 验证 HTTPS 是否开启成功

如:

https://127.0.0.1:10010

4、搭建GB28181视频直播平台

支持 Windows|Linux 64 位系统环境,支持内网、私有云部署