Skip to content

Commit 72b296b

Browse files
author
Po
committed
increase json length limits
1 parent c585fad commit 72b296b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

WalletProxy/src/main.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { NestFactory } from '@nestjs/core';
22
import { INestApplication } from '@nestjs/common';
33
import { AppModule } from './app.module';
4+
import { urlencoded, json } from 'express';
45
import { PPCRPC } from 'src/utils/rpc';
56
const config = require('./config/index');
67

@@ -32,7 +33,13 @@ async function bootstrapWhenNodeIsReady() {
3233
return setTimeout(bootstrapWhenNodeIsReady, 1000);
3334
}
3435

35-
return bootstrap(await NestFactory.create(AppModule));
36+
const app = await NestFactory.create(AppModule);
37+
38+
app.use(json({ limit: '5mb' }));
39+
app.use(urlencoded({ extended: true, limit: '5mb' }));
40+
41+
42+
return bootstrap(app);
3643
}
3744

3845
bootstrapWhenNodeIsReady();

0 commit comments

Comments
 (0)