diff --git a/packages/core/data-transfer/src/strapi/providers/remote-destination/index.ts b/packages/core/data-transfer/src/strapi/providers/remote-destination/index.ts index 6d5ae4e4c4..2a76a9d6ce 100644 --- a/packages/core/data-transfer/src/strapi/providers/remote-destination/index.ts +++ b/packages/core/data-transfer/src/strapi/providers/remote-destination/index.ts @@ -210,7 +210,10 @@ class RemoteStrapiDestinationProvider implements IDestinationProvider { }); } const wsProtocol = url.protocol === 'https:' ? 'wss:' : 'ws:'; - const wsUrl = `${wsProtocol}//${url.host}${url.pathname}${TRANSFER_PATH}/push`; + const wsUrl = `${wsProtocol}//${url.host}${url.pathname.replace( + /\/$/, + '' + )}${TRANSFER_PATH}/push`; // No auth defined, trying public access for transfer if (!auth) { diff --git a/packages/core/data-transfer/src/strapi/providers/remote-source/index.ts b/packages/core/data-transfer/src/strapi/providers/remote-source/index.ts index d3d4a62b8b..f0cdf902d3 100644 --- a/packages/core/data-transfer/src/strapi/providers/remote-source/index.ts +++ b/packages/core/data-transfer/src/strapi/providers/remote-source/index.ts @@ -227,7 +227,10 @@ class RemoteStrapiSourceProvider implements ISourceProvider { let ws: WebSocket; this.assertValidProtocol(url); const wsProtocol = url.protocol === 'https:' ? 'wss:' : 'ws:'; - const wsUrl = `${wsProtocol}//${url.host}${url.pathname}${TRANSFER_PATH}/pull`; + const wsUrl = `${wsProtocol}//${url.host}${url.pathname.replace( + /\/$/, + '' + )}${TRANSFER_PATH}/pull`; // No auth defined, trying public access for transfer if (!auth) {