diff --git a/src/lib/contentstack.ts b/src/lib/contentstack.ts index d69b57c..43f5497 100644 --- a/src/lib/contentstack.ts +++ b/src/lib/contentstack.ts @@ -6,6 +6,8 @@ import { Policy, StackConfig } from './types'; import { getHost } from './utils'; export * as Utils from '@contentstack/utils'; +let version = '{{VERSION}}'; + /** * @method stack * @memberof Contentstack @@ -71,6 +73,8 @@ export function stack(config: StackConfig): StackClass { defaultConfig.headers['x-header-ea'] = config.early_access.join(','); } + defaultConfig.headers['X-User-Agent'] = 'contentstack-delivery-typescript-{{PLATFORM}}/' + version; + // return new Stack(httpClient(defaultConfig), config); const client = httpClient(defaultConfig as any);