mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 11:36:29 +02:00
fix: #13918, make arrayLimit configurable increase default to 50
cap at 100
This commit is contained in:
@@ -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