Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apiHTTPHLS.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func HTTPAPIServerStreamHLSM3U8(c *gin.Context) {
}

if !RemoteAuthorization("HLS", c.Param("uuid"), c.Param("channel"), c.Query("token"), c.ClientIP()) {
c.IndentedJSON(500, Message{Status: 0, Payload: ErrorStreamUnauthorized.Error()})
requestLogger.WithFields(logrus.Fields{
"call": "RemoteAuthorization",
}).Errorln(ErrorStreamUnauthorized.Error())
Expand Down
1 change: 1 addition & 0 deletions apiHTTPHLSLL.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func HTTPAPIServerStreamHLSLLInit(c *gin.Context) {
}

if !RemoteAuthorization("HLS", c.Param("uuid"), c.Param("channel"), c.Query("token"), c.ClientIP()) {
c.IndentedJSON(500, Message{Status: 0, Payload: ErrorStreamUnauthorized.Error()})
requestLogger.WithFields(logrus.Fields{
"call": "RemoteAuthorization",
}).Errorln(ErrorStreamUnauthorized.Error())
Expand Down
1 change: 1 addition & 0 deletions apiHTTPMSE.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func HTTPAPIServerStreamMSE(c *gin.Context) {
}

if !RemoteAuthorization("WS", c.Param("uuid"), c.Param("channel"), c.Query("token"), c.ClientIP()) {
c.IndentedJSON(500, Message{Status: 0, Payload: ErrorStreamUnauthorized.Error()})
requestLogger.WithFields(logrus.Fields{
"call": "RemoteAuthorization",
}).Errorln(ErrorStreamUnauthorized.Error())
Expand Down
6 changes: 4 additions & 2 deletions apiHTTPSaveMP4.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package main

import (
"fmt"
"os"
"time"

"github.com/deepch/vdk/format/mp4"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
"os"
"time"
)

// HTTPAPIServerStreamSaveToMP4 func
Expand Down Expand Up @@ -36,6 +37,7 @@ func HTTPAPIServerStreamSaveToMP4(c *gin.Context) {
}

if !RemoteAuthorization("save", c.Param("uuid"), c.Param("channel"), c.Query("token"), c.ClientIP()) {
c.IndentedJSON(500, Message{Status: 0, Payload: ErrorStreamUnauthorized.Error()})
requestLogger.WithFields(logrus.Fields{
"call": "RemoteAuthorization",
}).Errorln(ErrorStreamUnauthorized.Error())
Expand Down
1 change: 1 addition & 0 deletions apiHTTPWebRTC.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func HTTPAPIServerStreamWebRTC(c *gin.Context) {
}

if !RemoteAuthorization("WebRTC", c.Param("uuid"), c.Param("channel"), c.Query("token"), c.ClientIP()) {
c.IndentedJSON(500, Message{Status: 0, Payload: ErrorStreamUnauthorized.Error()})
requestLogger.WithFields(logrus.Fields{
"call": "RemoteAuthorization",
}).Errorln(ErrorStreamUnauthorized.Error())
Expand Down