New Rate Limiting Binding - Impossible To Add New ENV Variables?
I just noticed this morning that if you’ve hooked up the new unsafe binding to the rate limiting feature…
You cannot add ENV variables in the CF Dashboard.
It always errors out with:
binding USER_WORKER_RATE_LIMITER of type ratelimit must have an namespace_id specified (Code: 10021)
What is the best course of action?
Also if you create a secret via wrangler can you add that in the wrangler.toml and have the value be read corectly?
Thanks for any help!
4 Replies
unsafe bindings come with these kinda issues
If you're publishing with wrangler, you shouldn't be touching dash for modifications
to add a secret you can do
wrangler secret put <NAME>
@Walshy | Deploying cool thanks. I did use
wrangler secret put
for more recent secrets. But where can keep record of these? I can't use the key in the wrangler.toml
file. What are the best practices here?
Would you recommend removing all my keys from the Dash and adding through wrangler
??what I do is just "# Secret: MY_SECRET" (so add it as a comment) in wrangler.toml
we've discussed a few times about having these live in wrangler.toml (just the keys) but we haven't yet decided on what that will look like/behave like
Cool thanks!
And sorry just to double check and potentially save myself a headache... is it best practice to delete my ENV variables in the dashboard and then add them all through
wrangler secret put
??
Thanks so much for the help tonight!