dkritarth / dkritarth/FreeFlow
Rate-limit KV still silently falls back to HTML_DRAFTS if UPLOAD_RATE_LIMITS unbound
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
\`getRateLimitStore\` in \`src/index.js\`:
\`\`\`js
function getRateLimitStore(env) {
return env.UPLOAD_RATE_LIMITS ?? env.HTML_DRAFTS;
}
\`\`\`
\`wrangler.toml.example\` now documents the \`UPLOAD_RATE_LIMITS\` binding (fixed in #3), but any deploy from before that change, or anyone who copies an old \`wrangler.toml\`, still silently mixes rate-limit counters into the drafts namespace with no warning — the exact issue #2 originally flagged.
**Ask:** either fail loudly (log a warning, or refuse rate limiting) when \`UPLOAD_RATE_LIMITS\` isn't bound instead of silently reusing \`HTML_DRAFTS\`, or drop the fallback entirely and document it as a required binding.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/index.js at getRateLimitStore and inspect how the rate-limit path uses the returned KV binding. Check wrangler.toml.example for the documented binding, then choose and implement one of the requested behaviors so an unbound UPLOAD_RATE_LIMITS cannot silently reuse HTML_DRAFTS; verify the resulting configuration or warning behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100