feat: rate-limiting

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2024-12-11 17:39:45 +01:00 committed by Philip Molares
parent e8f4cbabec
commit 876ebad1f3
10 changed files with 70 additions and 6 deletions

View file

@ -26,6 +26,9 @@ module.exports = {
errorTooLong: function (res) {
responseError(res, 413, 'Payload Too Large', 'Shorten your note!')
},
errorTooManyRequests: function (res) {
responseError(res, 429, 'Too Many Requests', 'Try again later.')
},
errorInternalError: function (res) {
responseError(res, 500, 'Internal Error', 'wtf.')
},