Fix ws upgrade for terminal session

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala committed 2020-09-16 23:24:04 +03:00
1 parent 09074e764c
commit 2d91698e20
1 file changed
+1 -1
+1 -1
View File
@@ -52,7 +52,7 @@ export class LensProxy {
this.handleRequest(proxy, req, res)
})
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)
} else {
if (req.headers.upgrade?.startsWith("SPDY")) {