mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
4cfbf7f71c
commit
0a0ca380d3
@ -21,8 +21,6 @@ module.exports = function(RED) {
|
||||
var cookieParser = require("cookie-parser");
|
||||
var getBody = require('raw-body');
|
||||
var cors = require('cors');
|
||||
var jsonParser = bodyParser.json();
|
||||
var urlencParser = bodyParser.urlencoded({extended:true});
|
||||
var onHeaders = require('on-headers');
|
||||
var typer = require('media-typer');
|
||||
var isUtf8 = require('is-utf8');
|
||||
@ -212,6 +210,10 @@ module.exports = function(RED) {
|
||||
}
|
||||
}
|
||||
|
||||
var maxApiRequestSize = RED.settings.apiMaxLength || '5mb';
|
||||
var jsonParser = bodyParser.json({limit:maxApiRequestSize});
|
||||
var urlencParser = bodyParser.urlencoded({limit:maxApiRequestSize,extended:true});
|
||||
|
||||
var metricsHandler = function(req,res,next) { next(); }
|
||||
if (this.metric()) {
|
||||
metricsHandler = function(req, res, next) {
|
||||
|
Loading…
Reference in New Issue
Block a user