mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
quickShell support for ws_proxy_url
This commit is contained in:
parent
5cf7a0026e
commit
0d67d23cb6
@ -74,10 +74,11 @@ function quickShell()
|
||||
config_update_value('ws_port', 8080);
|
||||
}
|
||||
|
||||
if (isset($config['ws_url']) === false) {
|
||||
if (isset($config['ws_proxy_url']) === false) {
|
||||
$ws_url = 'http://'.$config['ws_host'].':'.$config['ws_port'];
|
||||
} else {
|
||||
$ws_url = $config['ws_url'];
|
||||
preg_match('/\/\/(.*)/', $config['ws_proxy_url'], $matches);
|
||||
$ws_url = 'ws://'.$matches[1];
|
||||
}
|
||||
|
||||
// Gotty settings. Internal communication (WS).
|
||||
@ -196,7 +197,8 @@ function quickShell()
|
||||
return;
|
||||
}
|
||||
|
||||
$test = file_get_contents($ws_url);
|
||||
// If rediretion is enabled, we will try to connect to http:// or https:// endpoint.
|
||||
$test = get_headers($ws_url);
|
||||
if ($test === false) {
|
||||
if (empty($wiz) === true) {
|
||||
$wiz = new Wizard();
|
||||
@ -236,9 +238,8 @@ function quickShell()
|
||||
$new .= " + window.location.host + ':";
|
||||
$new .= $config['ws_port'].'/'.$method."';";
|
||||
} else {
|
||||
$new = "var url = (httpsEnabled ? 'wss://' : 'ws://') + ";
|
||||
$new .= 'window.location.host + ';
|
||||
$new .= "'".$config['ws_proxy_url'].'/'.$method."';";
|
||||
$new = "var url = '";
|
||||
$new .= $config['ws_proxy_url'].'/'.$method."';";
|
||||
}
|
||||
|
||||
// Update url.
|
||||
|
Loading…
x
Reference in New Issue
Block a user