mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
clean up / optimizations
This commit is contained in:
1 parent
606d1a9198
commit
1fa523c012
3 files changed
+6
-5
No files matched your search
@@ -173,7 +173,7 @@ export class ContextHandler {
|
||||
}
|
||||
|
||||
public applyHeaders(req: http.IncomingMessage) {
|
||||
req.headers["authorization"] = `Bearer ${this.id}` // Q: how it works when id == cluster.id ?
|
||||
req.headers["authorization"] = `Bearer ${this.id}`
|
||||
}
|
||||
|
||||
public async withTemporaryKubeconfig(callback: (kubeconfig: string) => Promise<any>) {
|
||||
@@ -188,7 +188,7 @@ export class ContextHandler {
|
||||
if (!this.proxyServer) {
|
||||
const proxyPort = await this.resolveProxyPort()
|
||||
const proxyEnv = Object.assign({}, process.env)
|
||||
if (this.cluster.preferences && this.cluster.preferences.httpsProxy) {
|
||||
if (this.cluster?.preferences.httpsProxy) {
|
||||
proxyEnv.HTTPS_PROXY = this.cluster.preferences.httpsProxy
|
||||
}
|
||||
this.proxyServer = new KubeAuthProxy(this.cluster, proxyPort, proxyEnv)
|
||||
|
||||
Reference in new issue
Block a user