This commit is contained in:
WJQSERVER 2024-09-27 15:18:47 +08:00
parent bb4e2d8ae7
commit 178d5f14c2
3 changed files with 27 additions and 13 deletions

View file

@ -45,7 +45,7 @@ func NoRouteHandler(cfg *config.Config) gin.HandlerFunc {
rawPath = strings.Replace(rawPath, "/blob/", "/raw/", 1)
}
if !auth.AuthHandler(c) {
if !auth.AuthHandler(c, cfg) {
c.AbortWithStatusJSON(401, gin.H{"error": "Unauthorized"})
logw("Unauthorized request: %s", rawPath)
return