We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8111263 commit bdcf9d6Copy full SHA for bdcf9d6
lib/common.ts
@@ -4,6 +4,12 @@ import os = require('os');
4
const pkg = require('../package.json');
5
6
export function getSdkHeaders(serviceName: string, serviceVersion: string, operationId: string): any {
7
+ // disable analytics headers in the browser - they cause cors issues
8
+ const isBrowser = typeof window !== 'undefined';
9
+ if (isBrowser) {
10
+ return {};
11
+ }
12
+
13
const sdkName = 'watson-apis-node-sdk';
14
const sdkVersion = pkg.version;
15
const osName = os.platform();
0 commit comments