diff --git a/libraries/nestjs-libraries/src/dtos/webhooks/webhooks.dto.ts b/libraries/nestjs-libraries/src/dtos/webhooks/webhooks.dto.ts index 47c7db72..c64f1751 100644 --- a/libraries/nestjs-libraries/src/dtos/webhooks/webhooks.dto.ts +++ b/libraries/nestjs-libraries/src/dtos/webhooks/webhooks.dto.ts @@ -18,6 +18,10 @@ export class WebhooksDto { @IsString() @IsUrl() @IsDefined() + @IsSafeWebhookUrl({ + message: + 'Webhook URL must be a public HTTPS URL and cannot point to internal network addresses', + }) url: string; @Type(() => WebhooksIntegrationDto)