Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Increase webhooks payload limit
Browse files Browse the repository at this point in the history
  • Loading branch information
geneh committed Sep 24, 2018
1 parent 0753a01 commit f40c555
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.js
Expand Up @@ -22,8 +22,8 @@ app.use(logger('dev'));
app.use(sendHelper());

// If we should be listening for webhooks, add the route before the json body parser so we get the raw bodies.
// Note also that the GitHub doc says events are capped at 5mb
app.use('/webhook', bodyParser.raw({ limit: '5mb', type: '*/*' }), require('./routes/webhook')(service, config.get('CRAWLER_WEBHOOK_SECRET')));
// Note also that the GitHub doc says events are capped at 25mb
app.use('/webhook', bodyParser.raw({ limit: '25mb', type: '*/*' }), require('./routes/webhook')(service, config.get('CRAWLER_WEBHOOK_SECRET')));
// It's safe to set limitation to 2mb.
app.use(bodyParser.json({ limit: '2mb' , strict: false}));
app.use('/status', require('./routes/status')(service));
Expand Down

0 comments on commit f40c555

Please sign in to comment.