From cfa12ea45eeddef637714bc85049ef29262f4da2 Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Thu, 6 Jul 2023 21:48:03 +0300 Subject: [PATCH] :bug: FIx the `websocket: bad handshake` error in `console` command in case Ingress is enabled --- cmd/console.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/console.go b/cmd/console.go index fe2381798..98250fb10 100644 --- a/cmd/console.go +++ b/cmd/console.go @@ -57,8 +57,10 @@ func runConsole() { Host: fmt.Sprintf("%s:%d", config.Config.Tap.Proxy.Host, config.Config.Tap.Proxy.Hub.Port), Path: "/scripts/logs", } + headers := http.Header{} + headers.Set("License-Key", config.Config.License) - c, _, err := websocket.DefaultDialer.Dial(u.String(), nil) + c, _, err := websocket.DefaultDialer.Dial(u.String(), headers) if err != nil { log.Error().Err(err).Send() return