зеркало из https://github.com/microsoft/ghcrawler.git
Increase webhooks payload limit
This commit is contained in:
Родитель
0753a01fff
Коммит
f40c5559ad
4
app.js
4
app.js
|
@ -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));
|
||||
|
|
Загрузка…
Ссылка в новой задаче