feat(gateway): add scoped proxy egress deployment
This commit is contained in:
@@ -31,6 +31,7 @@ const accountsFile = path.join(dataDir, 'accounts.json')
|
||||
const webhookDeliveriesFile = path.join(dataDir, 'webhook-deliveries.json')
|
||||
const outboundJobsFile = path.join(dataDir, 'outbound-jobs.json')
|
||||
const gatewayToken = String(process.env.WHATSAPP_GATEWAY_TOKEN || '')
|
||||
const defaultProxyUrl = String(process.env.WHATSAPP_DEFAULT_PROXY_URL || '').trim()
|
||||
const maxMessagesPerChat = Math.max(2_000, Number(process.env.MAX_MESSAGES_PER_CHAT || 20_000))
|
||||
const log = pino({ level: process.env.LOG_LEVEL || 'info' })
|
||||
|
||||
@@ -90,7 +91,7 @@ function accountWebhookSecret(account) {
|
||||
}
|
||||
|
||||
function accountProxyUrl(account) {
|
||||
return decryptCredential(account?.proxyUrlEncrypted || '')
|
||||
return decryptCredential(account?.proxyUrlEncrypted || '') || defaultProxyUrl
|
||||
}
|
||||
|
||||
function jsonSafe(value) {
|
||||
|
||||
Reference in New Issue
Block a user