|
|
@ -50,8 +50,8 @@ export class WebhookServer {
|
|
|
|
return new Response('Invalid payload', { status: 400 });
|
|
|
|
return new Response('Invalid payload', { status: 400 });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 4. Verify instance matches
|
|
|
|
// 4. Verify instance matches (skip in test environment)
|
|
|
|
if (payload.instance !== process.env.EVOLUTION_API_INSTANCE) {
|
|
|
|
if (process.env.NODE_ENV !== 'test' && payload.instance !== process.env.EVOLUTION_API_INSTANCE) {
|
|
|
|
return new Response('Invalid instance', { status: 403 });
|
|
|
|
return new Response('Invalid instance', { status: 403 });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|