Bump @types/node from 14.17.33 to 14.18.12 (#5127)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
dependabot[bot]andSebastian Malton authored and GitHub committed 2022-03-29 15:20:17 -04:00
1 parent 30d22bfb6d
commit 5ce0ef31c4
3 files changed
+11 -12

No files matched your search

+6 -7
View File
@@ -79,19 +79,18 @@ export class LensProxy extends Singleton {
this.proxyServer
.on("upgrade", (req: http.IncomingMessage, socket: net.Socket, head: Buffer) => {
const isInternal = req.url.startsWith(`${apiPrefix}?`);
const cluster = getClusterForRequest(req);
if (!cluster) {
logger.error(`[LENS-PROXY]: Could not find cluster for upgrade request from url=${req.url}`);
socket.destroy();
} else {
const isInternal = req.url.startsWith(`${apiPrefix}?`);
const reqHandler = isInternal ? shellApiRequest : kubeApiUpgradeRequest;
return socket.destroy();
(async () => reqHandler({ req, socket, head, cluster }))()
.catch(error => logger.error("[LENS-PROXY]: failed to handle proxy upgrade", error));
}
const reqHandler = isInternal ? shellApiRequest : kubeApiUpgradeRequest;
(async () => reqHandler({ req, socket, head, cluster }))()
.catch(error => logger.error("[LENS-PROXY]: failed to handle proxy upgrade", error));
});
}