We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a5051c commit 36cf10aCopy full SHA for 36cf10a
1 file changed
src/index.ts
@@ -338,6 +338,18 @@ export class Orb extends Core.APIClient {
338
fetch: options.fetch,
339
});
340
341
+ const customHeadersEnv = Core.readEnv('ORB_CUSTOM_HEADERS');
342
+ if (customHeadersEnv) {
343
+ const parsed: Record<string, string> = {};
344
+ for (const line of customHeadersEnv.split('\n')) {
345
+ const colon = line.indexOf(':');
346
+ if (colon >= 0) {
347
+ parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
348
+ }
349
350
+ options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
351
352
+
353
this._options = options;
354
this.idempotencyHeader = 'Idempotency-Key';
355
0 commit comments