elasticio-sailor-nodejs 3.0.0-sailor-proxy-dev11 → 3.0.0-sailor-proxy-dev13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/proxy-client.js +9 -7
- package/package.json +1 -1
package/lib/proxy-client.js
CHANGED
|
@@ -502,20 +502,21 @@ class ProxyClient {
|
|
|
502
502
|
} else if (type === 'http-reply') {
|
|
503
503
|
protocolVersion = 1;
|
|
504
504
|
}
|
|
505
|
-
let preparedData = data;
|
|
506
|
-
if (protocolVersion) {
|
|
507
|
-
preparedData = this.encryptMessageContent(data, protocolVersion);
|
|
508
|
-
}
|
|
509
505
|
const preparedMetadata = {
|
|
510
506
|
...metadata,
|
|
511
507
|
messageId: metadata.messageId || uuid.v4()
|
|
512
508
|
};
|
|
509
|
+
let preparedData = data;
|
|
510
|
+
if (protocolVersion) {
|
|
511
|
+
preparedData = this.encryptMessageContent(data, protocolVersion);
|
|
512
|
+
preparedMetadata.protocolVersion = protocolVersion;
|
|
513
|
+
}
|
|
513
514
|
return {
|
|
514
|
-
preparedData,
|
|
515
515
|
preparedMetadata: _.omitBy(
|
|
516
516
|
preparedMetadata,
|
|
517
|
-
(value, key) => key.toLowerCase()
|
|
518
|
-
)
|
|
517
|
+
(value, key) => key.toLowerCase() === HEADER_ROUTING_KEY
|
|
518
|
+
),
|
|
519
|
+
preparedData
|
|
519
520
|
};
|
|
520
521
|
}
|
|
521
522
|
|
|
@@ -545,6 +546,7 @@ class ProxyClient {
|
|
|
545
546
|
log.error(error);
|
|
546
547
|
throw error;
|
|
547
548
|
}
|
|
549
|
+
log.debug({ preparedMetadata, preparedDataSize: preparedData.length }, 'Prepared message for sending to proxy');
|
|
548
550
|
|
|
549
551
|
const queryParams = new URLSearchParams({
|
|
550
552
|
incomingMessageId,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elasticio-sailor-nodejs",
|
|
3
3
|
"description": "The official elastic.io library for bootstrapping and executing for Node.js connectors",
|
|
4
|
-
"version": "3.0.0-sailor-proxy-
|
|
4
|
+
"version": "3.0.0-sailor-proxy-dev13",
|
|
5
5
|
"main": "run.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc",
|