diff --git a/package.json b/package.json index afe8143..eac51b6 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/PropelAuth/node" }, - "version": "v2.1.1", + "version": "v2.2.0", "license": "MIT", "keywords": [ "auth", diff --git a/src/http.ts b/src/http.ts index d340b4f..0e4b859 100644 --- a/src/http.ts +++ b/src/http.ts @@ -12,9 +12,11 @@ export function httpRequest( method: string, body?: string ): Promise { + let userAgent = `propelauth-node/${process.env.npm_package_version} node/${process.version} ${process.platform}/${process.arch}` let headers: any = { Authorization: "Bearer " + apiKey, "Content-Type": "application/json", + "User-Agent": userAgent, } if (body !== undefined) { headers["Content-Length"] = Buffer.byteLength(body)