Skip to content

Commit 1fac9c3

Browse files
authored
Merge pull request #17 from maxmind/headers-fix
Fix user-agent header in request
2 parents 31d508a + 7934dcb commit 1fac9c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/webServiceClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as http from 'http';
22
import * as https from 'https';
3+
import { version } from '../package.json';
34
import Transaction from './request/transaction';
45
import * as models from './response/models';
56
import { WebServiceClientError } from './types';
@@ -62,7 +63,7 @@ export default class WebServiceClient {
6263
Accept: 'application/json',
6364
'Content-Length': Buffer.byteLength(postData),
6465
'Content-Type': 'application/json',
65-
'User-Agent': `minfraud-api-node/${process.env.npm_package_version}`,
66+
'User-Agent': `minfraud-api-node/${version}`,
6667
},
6768
host: this.host,
6869
method: 'POST',

0 commit comments

Comments
 (0)