-
Notifications
You must be signed in to change notification settings - Fork 107
chore: use rate limit API directly instead of DO #886
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
base: main
Are you sure you want to change the base?
Changes from all commits
5e78303
c7d1a8d
1fb992c
7eb457c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,18 +16,21 @@ | |
| "preview_id": "0211859b856e40d095ab4e2a5329a22d" | ||
| } | ||
| ], | ||
| "durable_objects": { | ||
| "bindings": [ | ||
| { | ||
| "name": "EXPLORER_EXPORT_RATE_LIMIT", | ||
| "class_name": "ExplorerExportRateLimit" | ||
| } | ||
| ] | ||
| }, | ||
| "ratelimits": [ | ||
| { | ||
| "name": "EXPLORER_EXPORT_RATE_LIMIT", | ||
| "namespace_id": "421701", | ||
| "simple": { "limit": 20, "period": 60 } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Setting Useful? React with 👍 / 👎. |
||
| } | ||
| ], | ||
| "migrations": [ | ||
| { | ||
| "tag": "v1", | ||
| "new_sqlite_classes": ["ExplorerExportRateLimit"] | ||
| }, | ||
| { | ||
| "tag": "v2", | ||
| "deleted_classes": ["ExplorerExportRateLimit"] | ||
| } | ||
| ], | ||
| "browser": { "binding": "BROWSER" }, | ||
|
|
@@ -41,14 +44,13 @@ | |
| "preview_id": "0211859b856e40d095ab4e2a5329a22d" | ||
| } | ||
| ], | ||
| "durable_objects": { | ||
| "bindings": [ | ||
| { | ||
| "name": "EXPLORER_EXPORT_RATE_LIMIT", | ||
| "class_name": "ExplorerExportRateLimit" | ||
| } | ||
| ] | ||
| }, | ||
| "ratelimits": [ | ||
| { | ||
| "name": "EXPLORER_EXPORT_RATE_LIMIT", | ||
| "namespace_id": "421701", | ||
| "simple": { "limit": 20, "period": 60 } | ||
| } | ||
| ], | ||
| "routes": [ | ||
| { | ||
| "custom_domain": true, | ||
|
|
@@ -97,14 +99,13 @@ | |
| "preview_id": "0211859b856e40d095ab4e2a5329a22d" | ||
| } | ||
| ], | ||
| "durable_objects": { | ||
| "bindings": [ | ||
| { | ||
| "name": "EXPLORER_EXPORT_RATE_LIMIT", | ||
| "class_name": "ExplorerExportRateLimit" | ||
| } | ||
| ] | ||
| }, | ||
| "ratelimits": [ | ||
| { | ||
| "name": "EXPLORER_EXPORT_RATE_LIMIT", | ||
| "namespace_id": "421701", | ||
| "simple": { "limit": 20, "period": 60 } | ||
| } | ||
| ], | ||
| "routes": [ | ||
| { | ||
| "custom_domain": true, | ||
|
|
@@ -148,14 +149,13 @@ | |
| "preview_id": "0211859b856e40d095ab4e2a5329a22d" | ||
| } | ||
| ], | ||
| "durable_objects": { | ||
| "bindings": [ | ||
| { | ||
| "name": "EXPLORER_EXPORT_RATE_LIMIT", | ||
| "class_name": "ExplorerExportRateLimit" | ||
| } | ||
| ] | ||
| }, | ||
| "ratelimits": [ | ||
| { | ||
| "name": "EXPLORER_EXPORT_RATE_LIMIT", | ||
| "namespace_id": "421701", | ||
| "simple": { "limit": 20, "period": 60 } | ||
| } | ||
| ], | ||
| "routes": [ | ||
| { | ||
| "custom_domain": true, | ||
|
|
||
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.
This call now passes
env.EXPLORER_EXPORT_RATE_LIMITinto aRateLimitparameter, but the committed generated bindings still type that env var as a durable object namespace, sopnpm --filter explorer check:typesfails with TS2741 (limitis missing). That blocks the required type-check/precommit path until worker types are regenerated (or the binding type is otherwise updated) in the same change.Useful? React with 👍 / 👎.