🎇 support add another alist

This commit is contained in:
微凉
2021-12-07 20:16:34 +08:00
parent 74d8fa3919
commit 985b81826f
8 changed files with 37 additions and 17 deletions

View File

@ -17,6 +17,11 @@ func PathCheck(c *gin.Context) {
}
req.Path = utils.ParsePath(req.Path)
c.Set("req",req)
token := c.GetHeader("Authorization")
if token == conf.Token {
c.Next()
return
}
meta, err := model.GetMetaByPath(req.Path)
if err == nil {
if meta.Password != "" && meta.Password != req.Password {