Skip to content

Commit b5d3570

Browse files
committed
Update to raise the body-parser limit to fix "Error: request entity too large" issue
1 parent 045c084 commit b5d3570

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

app.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,14 @@ realtime.io = io;
6767
app.use(methodOverride('_method'));
6868

6969
// create application/json parser
70-
var jsonParser = bodyParser.json();
70+
var jsonParser = bodyParser.json({
71+
limit: 1024 * 1024 * 10 // 10 mb
72+
});
7173

7274
// create application/x-www-form-urlencoded parser
7375
var urlencodedParser = bodyParser.urlencoded({
74-
extended: false
76+
extended: false,
77+
limit: 1024 * 1024 * 10 // 10 mb
7578
});
7679

7780
//session store

0 commit comments

Comments
 (0)