413 Payload Too Large code example

Example 1: error 413 request entity too large nginx

client_max_body_size 25m;

Example 2: 413 payload too large nodejs

var bodyParser = require('body-parser');
app.use(bodyParser.json({limit: "50mb"}));
app.use(bodyParser.urlencoded({limit: "50mb", extended: true, parameterLimit:50000}));

Example 3: 413 payload too large nodejs

app.use(express.json({limit: '50mb'}));
app.use(express.urlencoded({limit: '50mb'}));

Tags:

Misc Example