mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-12 18:32:44 +00:00
fix: improve error message when too many requests are sent
This commit is contained in:
@@ -69,6 +69,9 @@ export default async function start() {
|
||||
max: config.RATE_LIMIT, // limit each IP
|
||||
standardHeaders: true,
|
||||
legacyHeaders: false,
|
||||
message: (request: express.Request, response: express.Response) => {
|
||||
return `You can only make ${config.RATE_LIMIT} requests every 15min.`;
|
||||
},
|
||||
});
|
||||
const speedLimiter = slowDown({
|
||||
windowMs: 15 * 60 * 1000, // 15 minutes
|
||||
|
||||
Reference in New Issue
Block a user