feat(login): 添加 IP 限速机制以防止频繁登录尝试
- 在登录功能中实现同一 IP 1 分钟内最多尝试 10 次的限制 - 记录登录时间戳并过滤过期记录,确保登录尝试次数的准确性 - 优化未登录用户的返回信息,避免泄露敏感数据
This commit is contained in:
@@ -744,6 +744,9 @@ func setMakeCodeListener(name string, appIns *Application) {
|
||||
}
|
||||
}
|
||||
|
||||
if context.RouterString[0] != name {
|
||||
return isFinished
|
||||
}
|
||||
if len(context.RouterString) < 2 || len(context.RouterString) > 3 ||
|
||||
!(context.Router[context.RouterString[0]] != nil &&
|
||||
context.Router[context.RouterString[0]][context.RouterString[1]] != nil) {
|
||||
|
||||
Reference in New Issue
Block a user