mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-14 02:27:49 +01:00
fix: #13918, make arrayLimit configurable increase default to 50
cap at 100
This commit is contained in:
@@ -124,6 +124,7 @@
|
||||
"pretty": "^2.0.0",
|
||||
"progress-webpack-plugin": "1.0.16",
|
||||
"prompt": "1.3.0",
|
||||
"qs": "6.14.1",
|
||||
"redis": "5.10.0",
|
||||
"rimraf": "6.1.2",
|
||||
"rss": "1.2.2",
|
||||
|
||||
@@ -137,6 +137,12 @@ function setupExpressApp(app) {
|
||||
app.set('view engine', 'tpl');
|
||||
app.set('views', viewsDir);
|
||||
app.set('json spaces', global.env === 'development' ? 4 : 0);
|
||||
|
||||
// https://github.com/NodeBB/NodeBB/issues/13918
|
||||
const qs = require('qs');
|
||||
app.set('query parser', str => qs.parse(str, {
|
||||
arrayLimit: Math.max(100, nconf.get('queryParser:arrayLimit') || 50),
|
||||
}));
|
||||
app.use(flash());
|
||||
|
||||
app.enable('view cache');
|
||||
|
||||
Reference in New Issue
Block a user