From 0c7f7b33cb45e39bec481cf731d5206ddd1486fa Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Mon, 28 Apr 2025 10:19:57 +0200 Subject: [PATCH] fix(Customer.io Node): Allow EU customer.io domains in credential (#14880) Co-authored-by: Michael Kret --- .../credentials/CustomerIoApi.credentials.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/credentials/CustomerIoApi.credentials.ts b/packages/nodes-base/credentials/CustomerIoApi.credentials.ts index 35c2a90e73..8f8a0e101f 100644 --- a/packages/nodes-base/credentials/CustomerIoApi.credentials.ts +++ b/packages/nodes-base/credentials/CustomerIoApi.credentials.ts @@ -65,13 +65,21 @@ export class CustomerIoApi implements ICredentialType { ): Promise { // @ts-ignore const url = new URL(requestOptions.url ? requestOptions.url : requestOptions.uri); - if (url.hostname === 'track.customer.io' || url.hostname === 'api.customer.io') { + if ( + url.hostname === 'track.customer.io' || + url.hostname === 'track-eu.customer.io' || + url.hostname === 'api.customer.io' || + url.hostname === 'api-eu.customer.io' + ) { const basicAuthKey = Buffer.from( `${credentials.trackingSiteId}:${credentials.trackingApiKey}`, ).toString('base64'); // @ts-ignore Object.assign(requestOptions.headers, { Authorization: `Basic ${basicAuthKey}` }); - } else if (url.hostname === 'beta-api.customer.io') { + } else if ( + url.hostname === 'beta-api.customer.io' || + url.hostname === 'beta-api-eu.customer.io' + ) { // @ts-ignore Object.assign(requestOptions.headers, { Authorization: `Bearer ${credentials.appApiKey as string}`,