Rate Limiting not working in environments

Hi I have a rate limiter defined on my dev env as such:
[[env.dev.unsafe.bindings]]
name = "RATE_LIMITER"
type = "ratelimit"
namespace_id = "1001"
simple = { limit = 20, period = 10 }
[[env.dev.unsafe.bindings]]
name = "RATE_LIMITER"
type = "ratelimit"
namespace_id = "1001"
simple = { limit = 20, period = 10 }
When the worker executes, there isn't a limit function bound for me to call. A console log of the environment shows:
"RATE_LIMITER": {},
"RATE_LIMITER": {},
And if I try to run the limit:
TypeError: Illegal invocation\n at Object.limit (main.js:25902:38)\n
TypeError: Illegal invocation\n at Object.limit (main.js:25902:38)\n
1 Reply
kian
kian4mo ago
How are you calling limit()? This doesn't look like an issue with the function not being there.
Want results from more Discord servers?
Add your server