Merge branch 'ent-7268-Falla-sincronizacion-de-inventario-Integria-Pandora' into 'develop'

changed request protocol

See merge request artica/pandorafms!4033
This commit is contained in:
vgilc 2021-04-20 07:31:13 +00:00
commit a990689e59
2 changed files with 6 additions and 2 deletions

View File

@ -834,7 +834,7 @@ echo '</form>';
// AJAX call to check API connection.
$.ajax({
type: "GET",
type: "POST",
url: url,
dataType: "json",
data: data

View File

@ -1645,7 +1645,11 @@ function config_update_config()
$integria_hostname = (string) get_parameter('integria_hostname', $config['integria_hostname']);
if (parse_url($integria_hostname, PHP_URL_SCHEME) === null) {
$integria_hostname = 'http://'.$integria_hostname;
if (empty($_SERVER['HTTPS']) === false) {
$integria_hostname = 'https://'.$integria_hostname;
} else {
$integria_hostname = 'http://'.$integria_hostname;
}
}
if (!config_update_value('integria_hostname', $integria_hostname)) {