修复未启动防爆功能导致无法验证的Bug

This commit is contained in:
wsczx
2024-09-29 21:09:15 +08:00
parent c5a76ba436
commit 9e700830be
3 changed files with 3 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ func antiBruteForce(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// 如果最大验证失败次数为0则不启用防爆破功能
if base.Cfg.MaxBanCount == 0 {
next.ServeHTTP(w, r)
return
}
body, err := io.ReadAll(r.Body)