mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 18:27:05 +00:00
increase body limit
This commit is contained in:
@ -4,6 +4,7 @@ import rateLimit from 'express-rate-limit';
|
||||
import helmet from 'helmet';
|
||||
import { setupSwaggerAuthentication } from '../libs/common/src/util/user-auth.swagger.utils';
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import { json, urlencoded } from 'body-parser';
|
||||
import { SeederService } from '@app/common/seed/services/seeder.service';
|
||||
|
||||
async function bootstrap() {
|
||||
@ -11,6 +12,10 @@ async function bootstrap() {
|
||||
|
||||
app.enableCors();
|
||||
|
||||
// Set the body parser limit to 1 MB
|
||||
app.use(json({ limit: '1mb' }));
|
||||
app.use(urlencoded({ limit: '1mb', extended: true }));
|
||||
|
||||
app.use(
|
||||
rateLimit({
|
||||
windowMs: 5 * 60 * 1000,
|
||||
@ -42,7 +47,8 @@ async function bootstrap() {
|
||||
} catch (error) {
|
||||
console.error('Seeding failed!', error);
|
||||
}
|
||||
|
||||
console.log('Starting auth at port ...', process.env.PORT || 4000);
|
||||
await app.listen(process.env.PORT || 4000);
|
||||
}
|
||||
console.log('Starting auth at port ...', process.env.PORT || 4000);
|
||||
bootstrap();
|
||||
|
Reference in New Issue
Block a user