feat: 收口视频访问与摄像头密钥输出

This commit is contained in:
weijuesen
2026-08-14 00:07:52 +08:00
parent 440cf803e4
commit 1a29def480
14 changed files with 494 additions and 78 deletions
+2 -2
View File
@@ -44,13 +44,13 @@ func Auth(cfg *config.Config) gin.HandlerFunc {
return
}
// 视频片段流接口支持动态 ID,使用前缀+后缀匹配放行
// 视频片段流接口仅放行播放器请求;handler 必须校验 videoToken
if strings.HasPrefix(path, "/api/v1/video/clips/") && strings.HasSuffix(path, "/stream") {
c.Next()
return
}
// 直播流转码代理接口
// 直播流转码代理接口仅放行播放器请求;handler 必须校验 videoToken
if strings.HasPrefix(path, "/api/v1/video/cameras/") && (strings.HasSuffix(path, "/live/stream") || strings.HasSuffix(path, "/live/proxy")) {
c.Next()
return