1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Use .constructor(agentOptions)

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
Hung-Han (Henry) Chen 2022-06-07 13:21:46 +08:00
parent 44d5b9084b
commit a14f932a65
No known key found for this signature in database
GPG Key ID: 54B44603D251B788

View File

@ -170,10 +170,7 @@ export interface IRemoteKubeApiConfig {
clientKeyData?: string; clientKeyData?: string;
}; };
/** /**
* Custom instance of https.agent to use for the requests * Custom instance of https.agent
*
* @remarks the custom agent replaced default agent, options skipTLSVerify,
* clientCertificateData, clientKeyData and caData are ignored.
*/ */
agent?: Agent; agent?: Agent;
} }
@ -248,7 +245,7 @@ export function forRemoteCluster<
} }
if (config.agent) { if (config.agent) {
reqInit.agent = config.agent; reqInit.agent = config.agent.constructor(agentOptions);
} }
const token = config.user.token; const token = config.user.token;