mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-19 23:50:25 +08:00
优化系统用户登录校验
This commit is contained in:
@@ -30,7 +30,7 @@ func (this *TokenAction) RunGet(params struct {
|
||||
}()
|
||||
|
||||
// 没有登录,则限制请求速度
|
||||
if params.Auth.AdminId() <= 0 && lastTimestamp > 0 && time.Now().Unix()-lastTimestamp <= 1 {
|
||||
if params.Auth.AdminId() <= 0 && lastTimestamp > 0 && time.Now().Unix()-lastTimestamp <= 0 {
|
||||
this.Fail("请求速度过快,请稍后刷新后重试")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user