Skip to content

Commit

Permalink
fix: limit of json body not working
Browse files Browse the repository at this point in the history
- limit of bodyParser.json not
overwrite original limit of json body
- Move limit option into every express.json() functions
  • Loading branch information
Chinlinlee committed May 31, 2022
1 parent 501129a commit 6674105
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ app.use(express.static('public'));
app.use(express.urlencoded({
extended: true
}));
app.use(express.json());
app.use(express.json({
"type": "application/fhir+json"
"limit": "50mb"
}));
app.use(express.json({
"type": "application/fhir+json",
"limit": "50mb"
}));
app.use(bodyParser.json({ "limit": "50mb" }));
app.use(express.text({
"type": ["text/*", "/_xml", "xml", "+xml"]
}));
Expand Down

0 comments on commit 6674105

Please sign in to comment.