Skip to content

feat(cloudflare/ratelimit): add RateLimit binding#238

Open
agcty wants to merge 1 commit intoalchemy-run:mainfrom
agcty:codex/cloudflare-ratelimit-binding
Open

feat(cloudflare/ratelimit): add RateLimit binding#238
agcty wants to merge 1 commit intoalchemy-run:mainfrom
agcty:codex/cloudflare-ratelimit-binding

Conversation

@agcty
Copy link
Copy Markdown

@agcty agcty commented May 5, 2026

Adds a Cloudflare RateLimit marker and binding policy so Workers can attach type: "ratelimit" metadata via direct bindings or init-phase RateLimit.bind.

const signupThrottle = yield* Cloudflare.RateLimit({
  namespaceId: 1001,
  simple: { limit: 10, period: 60 },
});

export const Worker = Cloudflare.Worker("Worker", {
  main: "./src/worker.ts",
  bindings: { SIGNUP_THROTTLE: signupThrottle },
});

Depends on alchemy-run/distilled#256 for generated Workers upload schema support.

@agcty agcty force-pushed the codex/cloudflare-ratelimit-binding branch from 04876c8 to 33b5b6c Compare May 5, 2026 11:09
@agcty
Copy link
Copy Markdown
Author

agcty commented May 5, 2026

Verification update:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant