Skip to content

Commit e593369

Browse files
Merge pull request #6644 from BitGo/WP-000000/patch-constants-call-cf-token
feat(root): use additonal headers on constants fetch
2 parents c02b2a8 + bb229c9 commit e593369

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/sdk-api/src/bitgoAPI.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,12 @@ export class BitGoAPI implements BitGoBase {
553553
if (this._customProxyAgent) {
554554
resultPromise.agent(this._customProxyAgent);
555555
}
556+
if (this.getAdditionalHeadersCb) {
557+
const additionalHeaders = this.getAdditionalHeadersCb('get', this.url('/client/constants'));
558+
for (const { key, value } of additionalHeaders) {
559+
resultPromise.set(key, value);
560+
}
561+
}
556562
const result = await resultPromise;
557563
BitGoAPI._constants[env] = result.body.constants;
558564

0 commit comments

Comments
 (0)