We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98c6a4b commit 1a5897bCopy full SHA for 1a5897b
1 file changed
src/client.ts
@@ -328,6 +328,18 @@ export class Kernel {
328
});
329
this.#encoder = Opts.FallbackEncoder;
330
331
+ const customHeadersEnv = readEnv('KERNEL_CUSTOM_HEADERS');
332
+ if (customHeadersEnv) {
333
+ const parsed: Record<string, string> = {};
334
+ for (const line of customHeadersEnv.split('\n')) {
335
+ const colon = line.indexOf(':');
336
+ if (colon >= 0) {
337
+ parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
338
+ }
339
340
+ options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
341
342
+
343
this._options = options;
344
345
this.apiKey = apiKey;
0 commit comments