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.
Files changed (2) hide show
  1. package/index.js +10 -2
  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 = { 'Content-Type': 'application/json' };
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 = { 'Content-Type': 'application/json' };
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "helm-analytics",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "Official Node.js SDK for Helm Analytics",
5
5
  "main": "index.js",
6
6
  "scripts": {