multiple SERVER_PORT references updated to use HTTP_HOST

This commit is contained in:
IsaiDiaz
2025-07-02 12:07:52 -04:00
parent ba7e70fcd9
commit 615f0ff5a0
14 changed files with 24 additions and 24 deletions

View File

@@ -608,7 +608,7 @@ function WSOpen($force = false)
);
if (!isset($_SESSION["WS_END_POINT"])) {
$defaultEndpoint = $_SERVER["REQUEST_SCHEME"] . "://" . $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . "/sys" . config("system.workspace") . "/en/classic/services/wsdl2";
$defaultEndpoint = $_SERVER["REQUEST_SCHEME"] . "://" . $_SERVER["HTTP_HOST"] . "/sys" . config("system.workspace") . "/en/classic/services/wsdl2";
}
$endpoint = isset($_SESSION["WS_END_POINT"]) ? $_SESSION["WS_END_POINT"] : $defaultEndpoint;

View File

@@ -324,14 +324,13 @@ class CaseScheduler extends BaseCaseScheduler
//Set variables
$port = "";
if (isset($_SERVER["SERVER_PORT"])) {
$port = ($_SERVER["SERVER_PORT"] . "" != "80")? ":" . $_SERVER["SERVER_PORT"] : "";
} else {
if (defined("SERVER_PORT")) {
$port = (SERVER_PORT . "" != "80")? ":" . SERVER_PORT : "";
}
}
if (defined("SERVER_PORT")) {
$port = (SERVER_PORT . "" != "80")? ":" . SERVER_PORT : "";
}else{
$port = (isset($_SERVER['HTTP_HOST']) && strpos($_SERVER['HTTP_HOST'], ':') !== false) ? ':' . explode(':', $_SERVER['HTTP_HOST'])[1] : '';
}
$url = SERVER_NAME . $port . "/sys" . config("system.workspace") . "/" . SYS_LANG . "/classic/services/wsdl2";
$testConnection = true;