disable auth on download link for bots

This commit is contained in:
divyam234 2023-08-26 13:21:04 +05:30
parent e6b2a796f9
commit 4f48a4c797

View file

@ -4,12 +4,17 @@ import (
"net/http"
"time"
"github.com/divyam234/teldrive/utils"
"github.com/divyam234/teldrive/utils/auth"
"github.com/gin-gonic/gin"
"github.com/go-jose/go-jose/v3/jwt"
)
func Authmiddleware(c *gin.Context) {
if c.FullPath() == "/api/files/:fileID/:fileName" && utils.GetConfig().MultiClient {
c.Next()
}
cookie, err := c.Request.Cookie("user-session")
if err != nil {