feat: express trust X-Forwarded-For

This commit is contained in:
Asad 2025-01-17 15:14:09 -05:00
parent 64a430d623
commit a63c48a937

@ -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();
startServer();