Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Version 4.1.0

Compare
Choose a tag to compare
@siemensikkema siemensikkema released this 13 Apr 11:00
· 4 commits to master since this release
02ec165
  • Adds expiration functionality recently added to the Vapor Cache to prevent the cache being filled up with stale values, such as old rate-limiting keys.
  • Allows customization of the error thrown if they client is sending too many requests:
req.gatekeeper.gatekeeper(on: req, throwing: MyError())
GatekeeperMiddleware(error: MyError())
  • Fixes an issue where effectively even if the config was 5 requests per second, the client would only really have 4 request available and be rate-limited on the 5th. They are now correctly first rate-limited on request no. 6.

Thanks again @madsodgaard !