mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 10:17:15 +02: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));
|
app.use(bodyParser.urlencoded(urlencodedOpts));
|
||||||
|
|
||||||
const jsonOpts = nconf.get('bodyParser:json') || {
|
const jsonOpts = {
|
||||||
type: [
|
type: [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/ld+json',
|
'application/ld+json',
|
||||||
'application/activity+json',
|
'application/activity+json',
|
||||||
],
|
],
|
||||||
|
...nconf.get('bodyParser:json'),
|
||||||
};
|
};
|
||||||
app.use(bodyParser.json(jsonOpts));
|
app.use(bodyParser.json(jsonOpts));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user