Closed kennedyrs closed 4 years ago
@AndrewJo could you take a look?
At file adonis-throttle/middleware/ThrottleRequests.js they try to add a header this.throttle.store.secondsToExpiration(this.throttle.key)
if (!this.throttle.attempt()) {
this.throttle.incrementExpiration()
this._addHeaders(
response,
maxAttempts,
this.throttle.remainingAttempts(),
this.throttle.store.secondsToExpiration(this.throttle.key)
)
throw new TooManyRequestsException('Too Many Attempts.')
}
but at adonis-throttle/src/Drivers/Cache/Redis/index.js this function does not exists
@masasron @kennedyrs submitted PR #17 that fixes this issue!
Great, thank you @AndrewJo
When I try to use it with Redis, I have this error
Node v12.14.1 Adonis 4.1
is this an error or am I missing something?