mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(webconsole): msg write
This commit is contained in:
@@ -52,15 +52,23 @@ func init() {
|
||||
return err
|
||||
}
|
||||
connectParams := resp.GetConnectParams()
|
||||
if protocol, err := resp.GetConnectProtocol(); err != nil {
|
||||
protocol, err := resp.GetConnectProtocol()
|
||||
if err != nil {
|
||||
return err
|
||||
} else if !utils.IsInStringArray(protocol, []string{
|
||||
}
|
||||
if !utils.IsInStringArray(protocol, []string{
|
||||
command.PROTOCOL_TTY, webconsole_api.VNC,
|
||||
webconsole_api.SPICE, webconsole_api.WMKS, webconsole_api.WS,
|
||||
}) {
|
||||
fmt.Println(connectParams)
|
||||
return nil
|
||||
}
|
||||
if protocol == webconsole_api.WS {
|
||||
u, err = url.Parse(fmt.Sprintf("%s/ws", opt.WebconsoleUrl))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
newQuery := url.Values{}
|
||||
newQuery.Set("data", base64.StdEncoding.EncodeToString([]byte(connectParams)))
|
||||
|
||||
Reference in New Issue
Block a user