From 098b1b8dd1037e207bac7d3586a67c7a1bf3e134 Mon Sep 17 00:00:00 2001 From: qingzhuozhen <84748495+qingzhuozhen@users.noreply.github.com> Date: Thu, 8 Sep 2022 22:28:57 -0700 Subject: [PATCH] feat: add local evaluation library header (#8) --- packages/node/src/local/fetcher.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/node/src/local/fetcher.ts b/packages/node/src/local/fetcher.ts index 8f9fa18..88f4273 100644 --- a/packages/node/src/local/fetcher.ts +++ b/packages/node/src/local/fetcher.ts @@ -1,3 +1,4 @@ +import { version as PACKAGE_VERSION } from '../../gen/version'; import { LocalEvaluationDefaults } from '../types/config'; import { FlagConfig } from '../types/flag'; import { HttpClient } from '../types/transport'; @@ -36,6 +37,7 @@ export class FlagConfigFetcher { const endpoint = `${this.serverUrl}/sdk/rules?eval_mode=local`; const headers = { Authorization: `Api-Key ${this.apiKey}`, + 'X-Amp-Exp-Library': `experiment-node-server/${PACKAGE_VERSION}`, }; const body = null; this.logger.debug('[Experiment] Get flag configs');