1
0
mirror of synced 2024-11-12 01:10:47 +01:00

fix PayloadTooLargeError

This commit is contained in:
ghkkk090 2022-11-14 13:29:29 +07:00
parent 18daa363ff
commit d6411c8150
3 changed files with 6 additions and 3 deletions

View File

@ -12,7 +12,8 @@ const STARTUP_HOST = `${Config.getConfig().serverIp || "localhost"}:9002`;
export default class AllnetModule extends Module {
register(app: Application): void {
app.use(bodyParser.raw({
type: '*/*'
type: '*/*',
limit: '50mb' // idk.. i got PayloadTooLargeError: request entity too large (adding this solve the problem)
}));
app.use("/sys/servlet/PowerOn", function(req, res, next) {

View File

@ -37,7 +37,8 @@ const muchaApp = express();
const allnetApp = express();
app.use(bodyParser.raw({
type: '*/*'
type: '*/*',
limit: '50mb' // idk.. i got PayloadTooLargeError: request entity too large (adding this solve the problem)
}));
let useSentry = !!Config.getConfig().sentryDsn;

View File

@ -12,7 +12,8 @@ export default class MuchaModule extends Module {
app.use(express.urlencoded({
type: '*/*',
extended: true
extended: true,
limit: '50mb', // idk.. i got PayloadTooLargeError: request entity too large (adding this solve the problem)
}))
app.post('/updatacheck.do', (req, res) => {