1
0
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:
Elias Schneider
2024-11-01 23:41:57 +01:00
parent 5b9f4d7326
commit 376d747616
3 changed files with 3 additions and 0 deletions

View File

@@ -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
}