mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-16 07:16:12 +00:00
fix: errors in middleware do not abort the request
This commit is contained in:
@@ -32,6 +32,7 @@ func (m *RateLimitMiddleware) Add(limit rate.Limit, burst int) gin.HandlerFunc {
|
||||
limiter := getLimiter(ip, limit, burst)
|
||||
if !limiter.Allow() {
|
||||
c.Error(&common.TooManyRequestsError{})
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user