Skip to content

Commit 96bb098

Browse files
committed
Headers should be an object
1 parent f7d046f commit 96bb098

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ export class KubeConfig {
401401
});
402402

403403
if (!opts.headers) {
404-
opts.headers = [];
404+
opts.headers = {};
405405
}
406406
if (authenticator) {
407407
await authenticator.applyAuthentication(user, opts);

src/config_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ describe('KubeConfig', () => {
212212
kc.applytoHTTPSOptions(opts);
213213

214214
expect(opts).to.deep.equal({
215-
headers: [],
215+
headers: {},
216216
ca: new Buffer('CADATA2', 'utf-8'),
217217
cert: new Buffer('USER2_CADATA', 'utf-8'),
218218
key: new Buffer('USER2_CKDATA', 'utf-8'),
@@ -229,7 +229,7 @@ describe('KubeConfig', () => {
229229
};
230230
await kc.applyToRequest(opts);
231231
expect(opts).to.deep.equal({
232-
headers: [],
232+
headers: {},
233233
ca: new Buffer('CADATA2', 'utf-8'),
234234
auth: {
235235
username: 'foo',

0 commit comments

Comments
 (0)