Skip to content

Node.js based forum software built for the modern web

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

Barış Soner Uşaklı25c24298fb27
diff --git a/src/webserver.js b/src/webserver.js
index c27a4e5d4a..3cf390c329 100644
--- a/src/webserver.js
+++ b/src/webserver.js
@@ -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));
}