Browse Source

Reduced limit

Manu Mtz-Almeida 10 years ago
parent
commit
d05b31ed77
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/realtime-advanced/limit.go

+ 1 - 1
examples/realtime-advanced/limit.go

@@ -9,7 +9,7 @@ var ips = stats.New()
 func ratelimit(c *gin.Context) {
 	ip := c.ClientIP()
 	value := ips.Add(ip, 1)
-	if value > 1000 {
+	if value > 400 {
 		c.AbortWithStatus(401)
 	}
 }