add play link

This commit is contained in:
YouROK
2021-05-25 10:24:43 +03:00
parent 266ce9924d
commit d9b9a7077d
2 changed files with 4 additions and 0 deletions

View File

@@ -64,6 +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(), "/play") ||
(strings.HasPrefix(c.FullPath(), "/playlist") && c.FullPath() != "/playlistall/all.m3u") {
c.Set("not_auth", true)
return