add counter

This commit is contained in:
sky
2025-07-27 03:34:18 -04:00
parent 66f23e6494
commit 6813edbb0a
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ app.use(express.json());
const port = process.env.PORT || 3000;
const limiter = rateLimit({
windowMs: 60 * 1000, // 1 minute
limit: 50, // Limit each IP to 50 requests per `window` (here, per 1 minute).
limit: 60, // Limit each IP to 50 requests per `window` (here, per 1 minute).
standardHeaders: 'draft-8', // draft-6: `RateLimit-*` headers; draft-7 & draft-8: combined `RateLimit` header
legacyHeaders: false, // Disable the `X-RateLimit-*` headers.
ipv6Subnet: 56, // Set to 60 or 64 to be less aggressive, or 52 or 48 to be more aggressive