1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B #~: Fix VMRC with Apache (#2270)

This commit is contained in:
Frederick Borges 2022-08-31 12:44:35 +02:00 committed by GitHub
parent 57e738c424
commit bf31d21a17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View File

@ -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) {

View File

@ -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,

View File

@ -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("&");