mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-10 17:42:52 +01:00
fix: closes #13558, override/extend json opts from config.json
This commit is contained in:
@@ -239,12 +239,13 @@ function configureBodyParser(app) {
|
||||
}
|
||||
app.use(bodyParser.urlencoded(urlencodedOpts));
|
||||
|
||||
const jsonOpts = nconf.get('bodyParser:json') || {
|
||||
const jsonOpts = {
|
||||
type: [
|
||||
'application/json',
|
||||
'application/ld+json',
|
||||
'application/activity+json',
|
||||
],
|
||||
...nconf.get('bodyParser:json'),
|
||||
};
|
||||
app.use(bodyParser.json(jsonOpts));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user