Put API rate limiting on the endpoints people can abuse
A small public endpoint can start costly work every time it's called. Set API rate limits to suit what each action does, including work that happens before a user signs in.
npm install --save-dev @sitecmd/cli
npx sitecmd audit .
The CLI runs on your computer or in your CI, and your code stays there.
What it finds on a demo project
The CLI points to public routes that run without a rate limit, such as sign-in, sign-up, password reset and contact forms.
SiteCMD CLI 2.0.0
Demo project: Newsletter signup endpoint
npx sitecmd audit .
SiteCMD Code Scan - .
Checked: November 9, 2026
Framework: Express
Issues: 1 total | critical 0 | high 0 | medium 1 | low 0
Medium (1)
- [Security · security] No recognized rate limit for public-looking route - src/subscribe.js:7
Your code passes? Now watch your site.
Choose API rate limiting rules for each public action
List sign-in attempts, account creation, password resets and form submissions. Set limits for the caller and the work each endpoint can start, rather than giving every action the same allowance.
Enforce API rate limiting across serverless instances
Trace the route through any middleware and hosting controls, then enforce one shared allowance before expensive work starts.
Test rate limits on API routes before relying on them
- 1
Send requests across app instances
Test bursts and sustained traffic from more than one caller. Confirm the intended allowance applies across the deployed entry points.
- 2
Check what a rejected request starts
Check that a refused request doesn't send the email, write the record or call the protected service. Confirm the HTTP response and retry guidance match the policy.
Frequently asked questions
Does signing in replace API rate limiting?
No. A signed-in caller can still use up capacity by repeating work. Review limits for signed-in actions as well as endpoints people can use before sign-in.
Review paid model calls and incoming files next
Website security
Catch leaked API keys and exposed files before someone uses them against you.
AI API rate limiting and cost
Limit paid model work by caller and request size, with controls around each call.
File upload security
Check uploaded files on the server and keep each user's storage keys their own.