diff --git a/package.json b/package.json index c1a5ee6..45cb656 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/PropelAuth/cloudflare-worker" }, - "version": "v2.1.1", + "version": "v2.2", "license": "MIT", "keywords": [ "auth", diff --git a/src/http.ts b/src/http.ts index 70d7aa0..71e7fea 100644 --- a/src/http.ts +++ b/src/http.ts @@ -10,9 +10,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, + Authorization: "Bearer " + apiKey, "Content-Type": "application/json", + "User-Agent": userAgent, } return fetch(authUrlOrigin.origin + path, {