Fix ws upgrade for terminal session (#900)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala authored and GitHub committed 2020-09-16 23:43:03 +03:00
1 parent 61b1c9c5e9
commit e5a365d00e
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")) {