Version100%_Fonctionnel

Pushed by: admin
License: TA9O64YS7EPT (Professional)
Timestamp: 2026-02-22T17:50:09.196860
masterdev
Splunk Git Pusher 2 months ago
parent 621b3ac5d8
commit 9274bfcd57

@ -234,7 +234,17 @@ require([
}
var protocol = useSSL ? 'https' : 'http';
var url = protocol + '://' + host + ':' + port + '/health';
var url;
// Si c'est un nom de domaine (contient des lettres et des points, pas une IP)
// Ne pas ajouter le port (le proxy gère)
if (/^[a-zA-Z]/.test(host) && host.indexOf('.') > -1 && !/^(\d{1,3}\.){3}\d{1,3}$/.test(host)) {
// C'est un domaine, pas de port
url = protocol + '://' + host + '/health';
} else {
// C'est une IP ou localhost, ajouter le port
url = protocol + '://' + host + ':' + port + '/health';
}
console.log('Testing Deployer URL:', url);

@ -753,7 +753,16 @@ def call_deployer_agent(endpoint, method="GET", data=None, config=None):
timeout = config.get("timeout", 30)
protocol = "https" if use_ssl else "http"
url = f"{protocol}://{host}:{port}{endpoint}"
# Si c'est un nom de domaine (commence par une lettre et contient un point)
# Ne pas ajouter le port (le proxy gère)
import re
is_domain = bool(re.match(r'^[a-zA-Z]', host)) and '.' in host and not re.match(r'^(\d{1,3}\.){3}\d{1,3}$', host)
if is_domain:
url = f"{protocol}://{host}{endpoint}"
else:
url = f"{protocol}://{host}:{port}{endpoint}"
logger.info(f"Calling SH Deployer: {method} {url}")

@ -5,8 +5,8 @@
"useProxy": true
},
"deployer": {
"enabled": false,
"host": "10.10.40.14",
"enabled": true,
"host": "myprivspldev-shdp-api.jp-engineering.fr",
"port": 9998,
"token": "bc2564e5a885d49ac3811dc946ca5620da24da19b8a8f5c5fdfcd7c07a241688",
"useSSL": true

Loading…
Cancel
Save