api proxy

This commit is contained in:
微凉
2021-12-19 17:10:20 +08:00
parent 3d3a97288a
commit 8e7b2c5837
6 changed files with 49 additions and 20 deletions

View File

@ -14,6 +14,7 @@ func DownCheck(c *gin.Context) {
rawPath = utils.ParsePath(rawPath)
name := utils.Base(rawPath)
if sign == utils.SignWithToken(name, conf.Token) {
c.Set("sign", true)
c.Next()
return
}
@ -24,4 +25,4 @@ func DownCheck(c *gin.Context) {
return
}
c.Next()
}
}