Skip to content

Commit 2f894c8

Browse files
committed
Increasing limit of json body parsing to 1mb, fixes coreh#12
1 parent 3f62144 commit 2f894c8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ function GitHooked(ref, action) {
1919
// create express instance
2020
var githooked = express();
2121

22-
// middleware
2322
githooked.use(bodyParser.urlencoded({ extended: false }));
24-
githooked.use(bodyParser.json());
23+
24+
// json parsing middleware limit is increased to 1mb, otherwise large PRs/pushes will
25+
// fail due to maiximum content-length exceeded
26+
githooked.use(bodyParser.json({limit: 1000000}));
2527

2628
// main POST handler
2729
githooked.post('/', function (req, res ) {

0 commit comments

Comments
 (0)