Skip to content

feat: add rate limiting middleware to all API endpoints (#10) - #67

Merged
prodbycorne merged 2 commits into
SmartDropLabs:mainfrom
brain-marchine:fix-10-api-rate-limiting
Jul 20, 2026
Merged

feat: add rate limiting middleware to all API endpoints (#10)#67
prodbycorne merged 2 commits into
SmartDropLabs:mainfrom
brain-marchine:fix-10-api-rate-limiting

Conversation

@brain-marchine

Copy link
Copy Markdown
Contributor

Fixes #10

GrantFox OSS campaign — smart escrow payout on merge.

@prodbycorne
prodbycorne merged commit 737c902 into SmartDropLabs:main Jul 20, 2026
boluwacodes added a commit to boluwacodes/smartdrop-backend that referenced this pull request Jul 22, 2026
The merge of SmartDropLabs#67 (fix-10-api-rate-limiting) into main pasted the entire
top of the file twice and, within the second copy, declared `airdrops`
twice in module.exports so the later object-literal key silently dropped
expiryCheckIntervalSeconds/ledgerCacheTtlMs/expiryScanBatchSize used by
the airdrop expiry job. Broke `require('./config')` outright (duplicate
`const` in the same scope), taking every test that touches config with it.
boluwacodes added a commit to boluwacodes/smartdrop-backend that referenced this pull request Jul 22, 2026
Same bad-merge pattern as config.js: the whole file was pasted twice.
Kept the newer body (health checks, price-source circuit state,
airdrop expiry job wiring) and restored the API rate-limiting
middleware mounts from the older copy, since that wiring is the actual
feature SmartDropLabs#67 was merging in and would otherwise have been lost.
boluwacodes added a commit to boluwacodes/smartdrop-backend that referenced this pull request Jul 22, 2026
Same duplicated-file pattern; merged the two copies (keeping the
PAYLOAD_TOO_LARGE coverage added by the newer copy) and fixed the
RATE_LIMITED assertion to include retry_after_seconds, matching what
src/middleware/rateLimit.js actually returns.
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.

2 participants