optimize blacklist

This commit is contained in:
WJQSERVER 2025-02-14 07:19:17 +08:00
parent 97ae0044e7
commit 40c9ca5f38
5 changed files with 71 additions and 40 deletions

View file

@ -73,7 +73,7 @@ func NoRouteHandler(cfg *config.Config, limiter *rate.RateLimiter, iplimiter *ra
// 黑名单检查
if cfg.Blacklist.Enabled {
blacklist := auth.CheckBlacklist(repouser, username, repo)
blacklist := auth.CheckBlacklist(username, repo)
if blacklist {
logErrMsg := fmt.Sprintf("%s %s %s %s %s Blacklist Blocked repo: %s", c.ClientIP(), c.Request.Method, rawPath, c.Request.Header.Get("User-Agent"), c.Request.Proto, repouser)
errMsg := fmt.Sprintf("Blacklist Blocked repo: %s", repouser)