fix: closes #13558, override/extend json opts from config.json

This commit is contained in:
Barış Soner Uşaklı
2025-07-19 17:20:59 -04:00
parent 3f520c33ef
commit 25c24298fb

View File

@@ -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));
}