feat: add login failed ban ip list

This commit is contained in:
Jacky 2024-07-21 15:24:58 +08:00
parent ccb04c07d8
commit cff843b82b
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
43 changed files with 2264 additions and 959 deletions

View file

@ -1,9 +1,12 @@
package settings
type Auth struct {
IPWhiteList []string `ini:",,allowshadow"`
IPWhiteList []string `json:"ip_white_list" binding:"omitempty,dive,ip" ini:",,allowshadow"`
BanThresholdMinutes int `json:"ban_threshold_minutes" binding:"min=1"`
MaxAttempts int `json:"max_attempts" binding:"min=1"`
}
var AuthSettings = Auth{}
var AuthSettings = Auth{
BanThresholdMinutes: 10,
MaxAttempts: 10,
}