Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: secure /webhooks with IsSafeWebhookUrl

Enno Gelhaus5ae4c950db6a
diff --git a/libraries/nestjs-libraries/src/dtos/webhooks/webhooks.dto.ts b/libraries/nestjs-libraries/src/dtos/webhooks/webhooks.dto.ts
index 47c7db721..c64f1751b 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)