mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
B #~: Fix VMRC with Apache (#2270)
(cherry picked from commit bf31d21a17e9d1ca684a44ca8eee8b0acb4e6a0a)
This commit is contained in:
parent
c508ae015b
commit
3e468bed3d
@ -638,9 +638,9 @@ define(function(require) {
|
||||
type: "POST",
|
||||
dataType: "JSON",
|
||||
success: function(vminfo) {
|
||||
|
||||
var fireege_route = Config.publicFireedgeEndpoint.endsWith('/fireedge') ? '' : '/fireedge'
|
||||
$.ajax({
|
||||
url: Config.publicFireedgeEndpoint + "/fireedge/api/vcenter/token/" + vm_id,
|
||||
url: Config.publicFireedgeEndpoint + fireege_route + "/api/vcenter/token/" + vm_id,
|
||||
type: "GET",
|
||||
headers: {"Authorization": fireedge_token},
|
||||
success: function(token) {
|
||||
|
@ -272,6 +272,7 @@ define(function(require) {
|
||||
callback: function(request, response) {
|
||||
var link = RemoteActions.getLink(response,{
|
||||
port: Config.vncProxyPort,
|
||||
protocol: Config.vncWSS === "yes" ? "https:" : "http:",
|
||||
connnection_type: "vnc",
|
||||
extra_params: [
|
||||
"port=" + Config.vncProxyPort,
|
||||
@ -309,6 +310,7 @@ define(function(require) {
|
||||
var link = RemoteActions.getLink(response,{
|
||||
host: fireedge_endpoint.hostname,
|
||||
port: fireedge_endpoint.port,
|
||||
protocol: fireedge_endpoint.protocol,
|
||||
connnection_type: "vmrc",
|
||||
extra_path: "/fireedge/vmrc/" + response.data,
|
||||
});
|
||||
@ -338,6 +340,7 @@ define(function(require) {
|
||||
callback: function(request, response) {
|
||||
var link = RemoteActions.getLink(response, {
|
||||
port: Config.vncProxyPort,
|
||||
protocol: Config.vncWSS === "yes" ? "https:" : "http:",
|
||||
connnection_type: "spice",
|
||||
extra_params: [
|
||||
"password=" + response.password,
|
||||
|
@ -301,6 +301,7 @@ define(function(require) {
|
||||
options = $.extend({
|
||||
host: undefined,
|
||||
port: undefined,
|
||||
protocol: "http:",
|
||||
connnection_type: "",
|
||||
extra_path: "",
|
||||
extra_params: []
|
||||
@ -314,7 +315,7 @@ define(function(require) {
|
||||
]).filter(Boolean);
|
||||
|
||||
var endpoint = new URL(window.location.href);
|
||||
var websocketProtocol = endpoint.protocol === "https:" ? "wss:" : "ws:";
|
||||
var websocketProtocol = options.protocol === "https:" ? "wss:" : "ws:";
|
||||
|
||||
var websocket = websocketProtocol + "//";
|
||||
|
||||
@ -322,7 +323,9 @@ define(function(require) {
|
||||
websocket += options.host + ":" + options.port;
|
||||
else if (options.port)
|
||||
websocket += endpoint.hostname + ":" + options.port;
|
||||
else
|
||||
else if (options.host)
|
||||
websocket += options.host;
|
||||
else
|
||||
websocket += endpoint.host;
|
||||
|
||||
websocket += options.extra_path + "?" + params.join("&");
|
||||
|
Loading…
x
Reference in New Issue
Block a user