Skip to content

Commit 2704c7e

Browse files
fix(apiclient): useragent string missing slashes; security bump;
1 parent d306b42 commit 2704c7e

File tree

5 files changed

+39
-19
lines changed

5 files changed

+39
-19
lines changed

dist/apiclient.js

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apiclient.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 26 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/apiclient.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ export class APIClient {
135135
this.ua = (
136136
`${str} ` +
137137
`(${process.platform}; ${process.arch}; rv:${rv}) ` +
138-
`node-sdk${this.getVersion()} ` +
139-
`node${process.version}`
138+
`node-sdk/${this.getVersion()} ` +
139+
`node/${process.version}`
140140
);
141141
}
142142

@@ -146,7 +146,10 @@ export class APIClient {
146146
*/
147147
public getUserAgent(): string {
148148
if (!this.ua.length) {
149-
this.ua = `NODE-SDK (${process.platform}; ${process.arch}; rv:${this.getVersion()}) node${process.version}`;
149+
this.ua = (
150+
`NODE-SDK (${process.platform}; ${process.arch}; rv:${this.getVersion()}) ` +
151+
`node/${process.version}`
152+
);
150153
}
151154
return this.ua;
152155
}

0 commit comments

Comments
 (0)