This commit is contained in:
YouROK
2021-05-17 14:55:57 +03:00
parent 29f13fd482
commit e578628886
40 changed files with 1319 additions and 656 deletions

View File

@@ -63,7 +63,8 @@ func BasicAuth(accounts gin.Accounts) gin.HandlerFunc {
return func(c *gin.Context) {
user, found := pairs.searchCredential(c.Request.Header.Get("Authorization"))
if !found {
if strings.HasPrefix(c.FullPath(), "/stream") {
if strings.HasPrefix(c.FullPath(), "/stream") ||
(strings.HasPrefix(c.FullPath(), "/playlist") && c.FullPath() != "/playlistall/all.m3u") {
c.Set("not_auth", true)
return
}