mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-27 08:52:10 +00:00
api: return 429 http status for rate-limit
This commit is contained in:
parent
192635f2ce
commit
76a15e1b1d
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue