I want to implement some sort of API rate-limiting and blocks on my remix of this project like preventing someone from adding a blank URL to the server like this…
## Think the URL is undefined.
https://forked-apps-awake.glitch.me/api/urls/add?url=
…and instead, greet them with a JSON error and block them temporarily for a whole day like this…
{
"ok": false,
"description": "You sent us a blank URL and the server blocked your requests temporarily for a whole day.",
"request_data": {
"url": null,
"status": "urlAdd_aborted"
},
"apiAccessBlock": {
"status": "tempbanned",
"reason": "Sent a blank URL to the API.",
"expires_on": "24 hours"
}
}
But the question is what Node.js packages should I use for implementing rate-limits and automated/manual bans and how to implement them?