fix(gateway): enforce request body size limits
This commit is contained in:
@@ -99,7 +99,12 @@ export function registerChannels(deps: ChannelsDeps): ChannelsResult {
|
||||
// Register webhook handler adapter (if any webhooks configured)
|
||||
let webhookHandler: WebhookHandler | undefined;
|
||||
if (config.automation.webhooks.length > 0) {
|
||||
webhookHandler = new WebhookHandler(config.automation.webhooks, channelRegistry, config.automation.delivery_mode);
|
||||
webhookHandler = new WebhookHandler(
|
||||
config.automation.webhooks,
|
||||
channelRegistry,
|
||||
config.automation.delivery_mode,
|
||||
config.server.max_request_body_bytes,
|
||||
);
|
||||
channelRegistry.register(webhookHandler);
|
||||
gateway.setWebhookHandler(webhookHandler);
|
||||
console.log(`Registered ${config.automation.webhooks.length} webhook(s)`);
|
||||
|
||||
Reference in New Issue
Block a user