fix m3u auth

This commit is contained in:
YouROK
2021-04-14 14:25:35 +03:00
parent 0c0c53b8db
commit 1b5f101298
2 changed files with 19 additions and 3 deletions

View File

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