Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Wilkinson AWilco

View GitHub Profile
@Maqsim
Maqsim / 413-payload-too-large-fix.js
Last active Nov 12, 2022
HOW TO FIX "413 Payload too large" in NodeJS
View 413-payload-too-large-fix.js
const express = require('express');
const bodyParser = require('body-parser');
...
// Express 4.0
app.use(bodyParser.json({ limit: '10mb' }));
app.use(bodyParser.urlencoded({ extended: true, limit: '10mb' }));
// Express 3.0