Merge pull request #2182 from ph4z/develop

Contribution: Fix http(s) requests for UI clients.
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-10-20 18:39:21 -04:00
commit d396b099ec
8 files changed
+31 -24

No files matched your search

@@ -61,6 +61,10 @@
{
"style": "List",
"text": "webSocketsPort is the port used by the system to communicate over the local area network, by default set at 18041."
},
{
"style": "List",
"text": "webSocketsExternalURL is the URL used by the system to communicate over the wide area network, by default set undefined."
}
]
}
}
@@ -138,7 +138,7 @@
},
{
"style": "List",
"text": "Change the host parameter for the IP address of the machine running the backend.",
"text": "Change the host parameter for the IP address of the machine running the backend. If you use a reverse proxy you must manually add \"webSocketsExternalURL\": \"wss:\/\/mydomain.com:443\" config parameter.",
"translations": [
{
"language": "ID",
@@ -160,13 +160,7 @@
},
{
"language": "FR",
"text": "Changez le paramètre host pour l'adresse IP de la machine qui exécute le backend.",
"updated": 1623958474738,
"style": "List"
},
{
"language": "FR",
"text": "Changez le paramètre host pour l'adresse IP de la machine qui exécute le backend.",
"text": "Changez le paramètre host pour l'adresse IP de la machine qui exécute le backend. Si vous utilisez un reverse proxy ajoutez manuellement \"webSocketsExternalURL\": \"wss:\/\/mydomain.com:443\" dans les paramètres de configuration ",
"updated": 1623958474738,
"style": "List"
},
@@ -231,4 +225,4 @@
]
}
]
}
}
@@ -173,8 +173,15 @@ function newPlottersManager() {
let host = layer.lanNetworkNode.config.host
let webPort = layer.lanNetworkNode.config.webPort
let extWSURL = layer.lanNetworkNode.config.webSocketsExternalURL
let scheme = 'http'
if (host === undefined) { host = window.location.hostname }
if (webPort === undefined) { webPort = window.location.port }
if (extWSURL !== undefined) {
host = window.location.hostname
webPort = window.location.port
scheme = window.location.protocol.slice(0,-1)
}
let eventsServerClient = UI.projects.foundations.spaces.designSpace.workspace.eventsServerClients.get(layer.lanNetworkNode.id)
@@ -190,7 +197,8 @@ function newPlottersManager() {
host,
webPort,
eventsServerClient,
onProductStorageInitialized
onProductStorageInitialized,
scheme,
)
function onProductStorageInitialized(err) {