diff --git a/server.js b/server.js index 94ce7d1..41bbc0c 100644 --- a/server.js +++ b/server.js @@ -6,9 +6,11 @@ const routes = require('./routes'); const app = express(); +app.set('trust proxy', true); + app.use(rateLimit({ - windowMs: 15 * 60 * 1000, - max: 100 + windowMs: 5 * 60 * 1000, // 5min + max: 100, // 100 request per IP })); app.use(express.json()); @@ -38,4 +40,4 @@ const startServer = async () => { } }; -startServer(); \ No newline at end of file +startServer();