Skip to content

Commit b7c8977

Browse files
authored
feat: separate telemetry id header from auth token header (#254)
1 parent 57853f3 commit b7c8977

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/analysis.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { RegexNotToBeLogged, getCustom } from "./tools.js";
1010
export default { requestComponent, requestStack, requestImages, validateToken }
1111

1212
const rhdaTokenHeader = "rhda-token";
13+
const rhdaTelemetryId = "rhda-telemetry-id";
1314
const rhdaSourceHeader = "rhda-source"
1415
const rhdaOperationTypeHeader = "rhda-operation-type"
1516
const rhdaPackageManagerHeader = "rhda-pkg-manager"
@@ -260,6 +261,7 @@ function getTokenHeaders(opts = {}) {
260261
setRhdaHeader(rhdaSourceHeader, headers, opts);
261262
setRhdaHeader(rhdaOperationTypeHeader, headers, opts);
262263
setRhdaHeader(rhdaPackageManagerHeader, headers, opts)
264+
setRhdaHeader(rhdaTelemetryId, headers, opts);
263265

264266
if (process.env["EXHORT_DEBUG"] === "true") {
265267
console.log("Headers Values to be sent to exhort:" + EOL)

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const exhortDefaultUrl = "https://rhda.rhcloud.com";
4646
* MATCH_MANIFEST_VERSIONS?: string | undefined,
4747
* RHDA_SOURCE?: string | undefined,
4848
* RHDA_TOKEN?: string | undefined,
49+
* RHDA_TELEMETRY_ID?: string | undefined,
4950
* [key: string]: string | undefined,
5051
* }} Options
5152
*/

0 commit comments

Comments
 (0)