|
|
|
@ -176,6 +176,13 @@ export class WebhookManager {
|
|
|
|
|
throw new Error('WEBHOOK_URL is not set');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Skip self-test in production if using internal URL
|
|
|
|
|
if (process.env.NODE_ENV === 'production' &&
|
|
|
|
|
process.env.WEBHOOK_URL.startsWith('http://srv-captain--')) {
|
|
|
|
|
console.log('ℹ️ Skipping self-test for internal production URL');
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log('ℹ️ Testing webhook endpoint:', process.env.WEBHOOK_URL);
|
|
|
|
|
|
|
|
|
|
const testPayload = {
|
|
|
|
@ -189,6 +196,7 @@ export class WebhookManager {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
},
|
|
|
|
|
body: JSON.stringify(testPayload),
|
|
|
|
|
timeout: 5000 // Add timeout to prevent hanging
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (!response.ok) {
|
|
|
|
|