Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

feat: add custom rate limit types #500

Merged
merged 2 commits into from
May 16, 2024
Merged

Conversation

paulo
Copy link
Contributor

@paulo paulo commented May 16, 2024

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

@paulo paulo added the type: feature code contributing to the implementation of a feature and/or user facing functionality label May 16, 2024
@paulo paulo requested a review from eduardoboucas May 16, 2024 13:50
@paulo paulo self-assigned this May 16, 2024
@paulo paulo requested a review from a team as a code owner May 16, 2024 13:50
Skn0tt
Skn0tt previously approved these changes May 16, 2024
Copy link
Contributor

@Skn0tt Skn0tt left a 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

eduardoboucas
eduardoboucas previously approved these changes May 16, 2024
interface RateLimitConfig {
action?: RateLimitAction
aggregateBy?: RateLimitAggregator | RateLimitAggregator[]
algorithm?: RateLimitAlgorithm
Copy link
Member

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?

Copy link
Contributor Author

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!

@paulo paulo dismissed stale reviews from eduardoboucas and Skn0tt via 2658ace May 16, 2024 14:00
@paulo paulo enabled auto-merge (squash) May 16, 2024 14:01
@paulo paulo merged commit 00e262a into main May 16, 2024
6 checks passed
@paulo paulo deleted the feat/add-custom-rate-limit-types branch May 16, 2024 14:02
paulo pushed a commit that referenced this pull request May 16, 2024
🤖 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants