mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
fix / enable auth for /playlistall/all.m3u
This commit is contained in:
@@ -64,8 +64,8 @@ func BasicAuth(accounts gin.Accounts) gin.HandlerFunc {
|
|||||||
user, found := pairs.searchCredential(c.Request.Header.Get("Authorization"))
|
user, found := pairs.searchCredential(c.Request.Header.Get("Authorization"))
|
||||||
if !found {
|
if !found {
|
||||||
if strings.HasPrefix(c.FullPath(), "/stream") ||
|
if strings.HasPrefix(c.FullPath(), "/stream") ||
|
||||||
strings.HasPrefix(c.FullPath(), "/play") ||
|
// https://github.com/YouROK/TorrServer/issues/172
|
||||||
(strings.HasPrefix(c.FullPath(), "/playlist") && c.FullPath() != "/playlistall/all.m3u") {
|
(strings.HasPrefix(c.FullPath(), "/play") && c.FullPath() != "/playlistall/all.m3u") {
|
||||||
c.Set("not_auth", true)
|
c.Set("not_auth", true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user