Feat: add head proxy movie

pull/21/head
zijiren233 2 years ago
parent ed6d86fc1c
commit 4d206c406c

@ -105,6 +105,8 @@ func Init(e *gin.Engine, s *rtmps.Server, r *room.Rooms) {
movie.POST("/clear", ClearMovies)
movie.HEAD("/proxy/:roomId/:pullKey", ProxyMovie)
movie.GET("/proxy/:roomId/:pullKey", ProxyMovie)
{

@ -555,6 +555,7 @@ func ProxyMovie(ctx *gin.Context) {
ctx.Header("Content-Type", resp.Header().Get("Content-Type"))
l := resp.Header().Get("Content-Length")
ctx.Header("Content-Length", l)
ctx.Header("Content-Encoding", resp.Header().Get("Content-Encoding"))
length, err := strconv.ParseInt(l, 10, 64)
if err != nil {

Loading…
Cancel
Save