-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add custom rate limit types #500
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks perfectly fine, I don't think we need the more complex version from ZISI
src/function/v2.ts
Outdated
interface RateLimitConfig { | ||
action?: RateLimitAction | ||
aggregateBy?: RateLimitAggregator | RateLimitAggregator[] | ||
algorithm?: RateLimitAlgorithm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have this property if sliding_window
is the only possible value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great point, I've removed it!
🤖 I have created a release *beep* *boop* --- ## [2.7.0](v2.6.3...v2.7.0) (2024-05-16) ### Features * add custom rate limit types ([#500](#500)) ([00e262a](00e262a)) ### Bug Fixes * **deps:** update dependency @netlify/serverless-functions-api to v1.18.1 ([#497](#497)) ([cd92ae9](cd92ae9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com>
Base types for custom rate limit config type inference (almost forgot). Basically a dried out version of https://github.com/netlify/zip-it-and-ship-it/blob/main/src/rate_limit.ts, but let me know if you think I should just use the original one instead.
Related to ADN-294
Will do the same for edge-functions after this one gets through