api: return 429 http status for rate-limit

This commit is contained in:
lostdusty 2025-01-20 16:28:46 -03:00 committed by GitHub
parent 192635f2ce
commit 76a15e1b1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,7 +67,7 @@ export const runAPI = async (express, app, __dirname, isPrimary = true) => {
limit: env.rateLimitWindow
}
});
return res.status(status).json(body);
return res.status(429).json(body);
};
const keyGenerator = (req) => hashHmac(getIP(req), 'rate').toString('base64url');