helm-analytics 5.0.1 → 5.0.2
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/index.js +10 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -89,7 +89,11 @@ class HelmAnalytics {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
const headers = {
|
|
92
|
+
const headers = {
|
|
93
|
+
'Content-Type': 'application/json',
|
|
94
|
+
'User-Agent': payload.userAgent || 'HelmAnalytics/NodeSDK',
|
|
95
|
+
'X-Forwarded-For': payload.clientIp || ''
|
|
96
|
+
};
|
|
93
97
|
if (this.apiKey) {
|
|
94
98
|
headers['Authorization'] = `Bearer ${this.apiKey}`;
|
|
95
99
|
}
|
|
@@ -123,7 +127,11 @@ class HelmAnalytics {
|
|
|
123
127
|
isServerSide: true
|
|
124
128
|
};
|
|
125
129
|
|
|
126
|
-
const headers = {
|
|
130
|
+
const headers = {
|
|
131
|
+
'Content-Type': 'application/json',
|
|
132
|
+
'User-Agent': payload.userAgent || 'HelmAnalytics/NodeSDK',
|
|
133
|
+
'X-Forwarded-For': payload.clientIp || ''
|
|
134
|
+
};
|
|
127
135
|
if (this.apiKey) {
|
|
128
136
|
headers['Authorization'] = `Bearer ${this.apiKey}`;
|
|
129
137
|
}
|