feat: express trust X-Forwarded-For
This commit is contained in:
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();
|
||||
|
Loading…
Reference in New Issue
Block a user