@yobytechautomation/config-lib 0.3.2 → 0.3.3
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.
|
@@ -112,12 +112,16 @@ class BaseConfigServiceImpl {
|
|
|
112
112
|
.update(apiKey + machineId)
|
|
113
113
|
.digest("hex");
|
|
114
114
|
console.log('DEBUG SIGNATURE:', signature);
|
|
115
|
+
const clientIp = await axios_1.default.get('https://api.ipify.org?format=json')
|
|
116
|
+
.then(res => res.data.ip)
|
|
117
|
+
.catch(() => 'unknown');
|
|
115
118
|
const res = await axios_1.default.get(url, {
|
|
116
119
|
headers: {
|
|
117
120
|
"x-api-key": apiKey,
|
|
118
121
|
"x-license-secret": secret,
|
|
119
122
|
"x-machine-id": machineId,
|
|
120
123
|
'x-signature': signature,
|
|
124
|
+
'x-client-ip': clientIp,
|
|
121
125
|
},
|
|
122
126
|
timeout: 5000,
|
|
123
127
|
});
|