set request limits
This commit is contained in:
parent
602f1b002c
commit
985eddd3f1
2 changed files with 2 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ import UserData from '../interfaces/common/UserData';
|
|||
|
||||
const defaultRateLimitMiddleware = rateLimit({
|
||||
windowMs: 10 * 60 * 1000, // 10 minutes
|
||||
max: 60000000000, // limit each IP to 6000 requests per windowMs (10 requests/second)
|
||||
max: 6000, // limit each IP to 6000 requests per windowMs (10 requests/second)
|
||||
// temporary disable rate limiting
|
||||
message: {
|
||||
success: false,
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import ordersModerationService from './workers/ordersModerationService';
|
|||
const PORT = process.env.PORT || 3000;
|
||||
|
||||
const app = express();
|
||||
app.set('trust proxy', 1);
|
||||
const server = http.createServer(app);
|
||||
const io = new Server(server);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue