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

Fix ws upgrade for terminal session (#900)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2020-09-16 23:43:03 +03:00 committed by GitHub
parent 61b1c9c5e9
commit e5a365d00e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ export class LensProxy {
this.handleRequest(proxy, req, res) this.handleRequest(proxy, req, res)
}) })
spdyProxy.on("upgrade", (req: http.IncomingMessage, socket: net.Socket, head: Buffer) => { spdyProxy.on("upgrade", (req: http.IncomingMessage, socket: net.Socket, head: Buffer) => {
if (req.url.startsWith(`${apiPrefix}/?`)) { if (req.url.startsWith(`${apiPrefix}?`)) {
this.handleWsUpgrade(req, socket, head) this.handleWsUpgrade(req, socket, head)
} else { } else {
if (req.headers.upgrade?.startsWith("SPDY")) { if (req.headers.upgrade?.startsWith("SPDY")) {