Browse Source

update

tmp
shenjiachi 6 days ago
parent
commit
16dbd3f9c9
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      app/mw/mw_limiter.go

+ 4
- 4
app/mw/mw_limiter.go View File

@@ -16,10 +16,10 @@ func Limiter(c *gin.Context) {
limit := 500 // 限流次数
ttl := 2 // 限流过期时间
ip := utils.GetIP(c.Request)
//if ip != "221.4.210.167" {
// e.OutErr(c, e.ERR, "系统维护中~")
// return
//}
if ip != "221.4.210.167" {
e.OutErr(c, e.ERR, "系统维护中~")
return
}
// 读取token或者ip
token := c.GetHeader("Authorization")
// 判断是否已经超出限额次数


Loading…
Cancel
Save