|
@@ -5,7 +5,6 @@ WebSocketClient.prototype._generateEndpoint = function () {
|
|
|
let protocol = location.protocol
|
|
let protocol = location.protocol
|
|
|
let hostname = location.hostname
|
|
let hostname = location.hostname
|
|
|
let port = location.port
|
|
let port = location.port
|
|
|
-
|
|
|
|
|
let prefix;
|
|
let prefix;
|
|
|
if (protocol === 'https') {
|
|
if (protocol === 'https') {
|
|
|
if (port === 443) {
|
|
if (port === 443) {
|
|
@@ -21,9 +20,7 @@ WebSocketClient.prototype._generateEndpoint = function () {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- var host1 = window.location.host
|
|
|
|
|
- var url = 'wss://' + host1 + '/ws/ssh?token=12345678'
|
|
|
|
|
- return url;
|
|
|
|
|
|
|
+ return prefix + '/ws/ssh?token=12345678'
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
WebSocketClient.prototype.connect = function (options) {
|
|
WebSocketClient.prototype.connect = function (options) {
|