🐛 FIx the websocket: bad handshake error in console command in case Ingress is enabled

This commit is contained in:
M. Mert Yildiran 2023-07-06 21:48:03 +03:00
parent 9a7c23f070
commit cfa12ea45e
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461

View File

@ -57,8 +57,10 @@ func runConsole() {
Host: fmt.Sprintf("%s:%d", config.Config.Tap.Proxy.Host, config.Config.Tap.Proxy.Hub.Port), Host: fmt.Sprintf("%s:%d", config.Config.Tap.Proxy.Host, config.Config.Tap.Proxy.Hub.Port),
Path: "/scripts/logs", 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 { if err != nil {
log.Error().Err(err).Send() log.Error().Err(err).Send()
return return