Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ First, add a [binding](/workers/runtime-apis/bindings) to your Worker that gives
```toml
main = "src/index.js"

[[unsafe.bindings]]
[[ratelimits]]
name = "MY_RATE_LIMITER"
type = "ratelimit"
# An identifier you define, that is unique to your Cloudflare account.
Expand Down Expand Up @@ -104,14 +104,14 @@ For example, here is how you can define two rate limiting configurations for fre
main = "src/index.js"

# Free user rate limiting
[[unsafe.bindings]]
[[ratelimits]]
name = "FREE_USER_RATE_LIMITER"
type = "ratelimit"
namespace_id = "1001"
simple = { limit = 100, period = 60 }

# Paid user rate limiting
[[unsafe.bindings]]
[[ratelimits]]
name = "PAID_USER_RATE_LIMITER"
type = "ratelimit"
namespace_id = "1002"
Expand All @@ -135,7 +135,7 @@ For example, to apply a rate limit of 1500 requests per minute, you would define
<WranglerConfig>

```toml
[[unsafe.bindings]]
[[ratelimits]]
name = "MY_RATE_LIMITER"
type = "ratelimit"
namespace_id = "1001"
Expand Down
Loading