This repository has been archived by the owner on Apr 20, 2024. It is now read-only.
Releases: ml-archive/gatekeeper
Releases · ml-archive/gatekeeper
Support Forwarded header
Support the Forwarded header in addition to the already supported X-Forwarded-For
header (#22). Thanks @NeedleInAJayStack!
Version 4.1.0
- 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 !
Version 4.0.0
Updated for Vapor 4 thanks to @madsodgaard 🎉 🙏🏻
Version 3.0.0
Migrated to Vapor 3 🎉
Version 2.0.1
Fixed
- Broken tests.
Version 2.0.0
Changed
- Removed the SSL enforcing functionality to simplify the responsibility of this package (to deal with rate limiting)
Version 1.0.0
- Vapor 2 released 🎉
Version 0.1.0
New:
- Rate limiter
- SSLEnforcer